JSON ⇄ YAML Converter
Processed Client SideConvert between JSON and YAML in either direction, entirely in your browser.
Bookmark this tool now — skip the search next time you need it.
About JSON ⇄ YAML Converter
This tool runs entirely in your browser. Whatever you paste is processed on your own device and is never uploaded, logged, or sent to any server.
Convert JSON to YAML and YAML back to JSON in either direction, swapping between the two with one click. The two formats carry the same data model, which is why the conversion is lossless in practice — JSON is what APIs speak, YAML is what configuration files and CI pipelines speak, and moving between them is a routine chore. Converting an API response into YAML makes it dramatically easier to read and to comment on; converting a YAML config into JSON makes it something a program can consume without a parser dependency. Both directions report parse errors clearly rather than producing quietly wrong output. The YAML side is emitted with two-space indentation and no line wrapping, so long strings and URLs stay on one line instead of being folded across several — which is what keeps the result diff-friendly and safe to paste into a manifest.
Key features
- Both directions in one tool, with a swap button that flips the conversion and moves the output back into the input
- Full YAML support via a standards-compliant parser — anchors, multi-line strings, and nested structures
- Parse errors reported clearly for either format, with the underlying message
- Syntax-highlighted panes with distinct colouring for JSON and for YAML
- Handles deeply nested documents and long lists
- Two-space indentation and unwrapped lines on output, matching the convention Kubernetes, Docker Compose, and most CI systems use
- Repeated structures written out in full rather than as anchors and aliases, so the output stays readable to anyone who has not met YAML references
- One-click copy of whichever direction you converted
- Runs entirely in your browser — Kubernetes manifests and CI configs are never uploaded
How to use it
- Choose the direction, or start pasting into whichever side you have.
- Paste your JSON or YAML into the input pane.
- Click Convert.
- Use Swap to flip the direction, or copy the result.
Tips & common mistakes
- YAML is a superset of JSON, so any valid JSON is already valid YAML. The conversion to YAML is really a reformatting into the readable block style.
- Indentation is structural in YAML and must be spaces — tabs are a syntax error. This is the single most common YAML mistake.
- Beware the Norway problem: in older YAML versions, unquoted no, yes, on, and off parse as booleans, so a country code of NO can become false. Quote strings that could be misread.
- A YAML value beginning with a special character — a colon, a hash, an at sign, a brace — needs quoting or the parser will misread it.
- YAML supports comments and JSON does not, so converting YAML to JSON silently discards every comment. Keep the YAML as your source of truth if the comments matter.
- For a config that will be both hand-edited and machine-read, keep YAML in the repository and convert to JSON at build time rather than maintaining both.
- Anchors and aliases in your input are resolved on the way in and written out in full on the way back, so a YAML file that used references to avoid repetition will come back longer than it went in. That is a readability trade, not a data change.
- A JSON document converted to YAML and straight back will match. Going the other way is where a file can change shape, because comments, anchors, and the choice of quoting style are all things YAML carries and JSON has nowhere to put.
- Working with a Rust or Python config in TOML instead? Convert it first with TOML to JSON.