JSON formatter and validator
JSON to YAML converter
Convert JSON into clean, human-readable YAML for config files, Kubernetes manifests, and CI pipelines — privately, in your browser.
Input JSON
0 lines | 0 charsOutput
0 lines | 0 charsExample
{ "name": "api", "ports": [80, 443], "debug": false }name: api
ports:
- 80
- 443
debug: falseHow to convert JSON to YAML
From JSON payload to indented YAML in a few clicks.
Paste or load your JSON
Paste JSON into the Input panel, upload a .json file, or fetch it from a URL. Objects, arrays, and scalars are all supported at any nesting depth.
Convert to YAML
YAML is already selected in the Convert dropdown on this page. Click Convert to produce block-style YAML with proper indentation for every nested level.
Adjust the indentation
Use the Pretty indent control to set how many spaces each nesting level uses (1–8). Two spaces is the conventional YAML default and matches most linters.
Copy or download the YAML
Copy the result to your clipboard or download it, then drop it straight into a values.yaml, a GitHub Actions workflow, or a Kubernetes manifest.
JSON to YAML — questions
What to expect from the generated YAML.
Why convert JSON to YAML?
YAML is easier for humans to read and edit than JSON: no braces or trailing-comma errors, and it supports comments. It is the standard format for Kubernetes manifests, Docker Compose, GitHub Actions, Ansible, and many other configuration tools.
How are strings quoted in the output?
Plain strings made up of letters, digits, and simple punctuation are left unquoted for readability. Strings containing spaces, special characters, or anything ambiguous are quoted so they round-trip safely through a YAML parser.
How are nested objects and arrays represented?
As standard block-style YAML: nested objects are indented under their key, and array items are listed with a leading dash. Empty objects render as {} and empty arrays as [].
Is YAML really a superset of JSON?
Yes. Since YAML 1.2, every valid JSON document is also valid YAML, so the conversion is lossless for the data itself. YAML simply adds a more readable surface syntax plus features like comments and anchors that JSON lacks.
Does the conversion happen on a server?
No. All processing is done locally in your browser, so your configuration and secrets are never transmitted or stored anywhere.