YAML to JSON Converter
Paste YAML and get JSON straight away, or flip the direction and turn JSON into clean YAML. Config files, Kubernetes manifests and CI pipelines stay on your device, because nothing is uploaded.
JSON
Loading the converter…
YAML and JSON side by side
YAML is a superset of JSON: every JSON file is also valid YAML. YAML adds indentation instead of braces, comments with #, block strings with | and >, and anchors to reuse a piece of data. That makes it the usual format for config files, such as Docker Compose, Kubernetes, GitHub Actions and GitLab CI. JSON is stricter and simpler, so APIs and most programming languages read it out of the box.
Common YAML mistakes
Indentation must use spaces, never tabs, and items at the same level must line up exactly. A key can appear only once in a map. A colon inside a value needs quotes when it's followed by a space, as in title: "Note: read this". And values like 1.10 or 2026-01-01 should be quoted when you mean them as text, because some parsers read them as a number or a date.
How to convert YAML to JSON
- 1
Paste your YAML
Paste it into the input pane, or press Sample to try a small pipeline file. To go the other way, switch to JSON → YAML or press Swap to send the result back as input.
- 2
Check the result
The JSON shows up as you type, indented with 2 or 4 spaces. If the YAML has a mistake, such as a bad indent or a duplicate key, you see the reason with its line and column instead.
- 3
Copy or download
Copy the result to the clipboard, or download it as a .json or .yaml file.
Frequently asked questions
Are anchors, aliases and merge keys supported?
Yes. An alias like *defaults is replaced by the data of its anchor, and a << merge key copies the keys of the merged map into the one that has it, with the map's own keys winning. JSON has no anchors, so the result has every value written out in full.
What happens to a YAML file with several documents?
A file with several documents separated by --- becomes one JSON array, with one item per document in the same order. Empty documents, such as a stray --- at the end of the file, are left out. A file with one document gives just that value, without an array around it.
Why does yes stay a string?
The converter reads YAML 1.2, the current version, where only true and false are booleans. Older YAML 1.1 parsers also read yes, no, on and off as booleans, which is a common source of bugs. When converting JSON to YAML, strings like these get quotes, so every parser reads them as text.
Are comments kept?
No. JSON has no comments, so they're dropped when converting YAML to JSON, and a round trip back to YAML won't bring them back. Key order is kept in both directions.
Is my file uploaded?
No. The conversion runs in your browser with JavaScript, so secrets in a config file never leave your device. You can disconnect from the internet after the page has loaded and it keeps working.