YAML to JSON converter
Paste YAML to get JSON, or switch direction to turn JSON into YAML. Errors show the line and column, and nothing you paste is uploaded.
runs in your browser · nothing uploaded
How to use it
- Choose YAML → JSON or JSON → YAML.
- Paste your input on the left. The result appears on the right as you type.
- If there is an error, its line and column are shown below.
- Copy the result.
Which YAML rules apply
This tool uses js-yaml 4, which follows YAML 1.2. In YAML 1.2 the words yes, no, on and off are plain strings. Older YAML 1.1 parsers, including PyYAML, read them as true and false, which is the source of the famous "Norway problem" where the country code NO became false. Quote such values to be safe in every parser.
Anchors and aliases (&name and *name) are expanded in the JSON output, and a file with several documents separated by --- becomes a JSON array.
Things that change in conversion
JSON has no comments, so YAML comments are dropped. Unquoted dates such as 2026-11-30 are read as timestamps and come out as full ISO date-time strings in JSON. Quote them in the YAML if you want them kept as plain text.
Questions
Is what I paste sent to a server?
No. The tool runs entirely in your browser with JavaScript. Nothing you type or paste is uploaded, logged or stored by us, so it is safe to use with real data.
Is JSON valid YAML?
Almost always, yes. YAML 1.2 was designed so that JSON documents are valid YAML, so a YAML parser reads most JSON as is.
Why "bad indentation"?
YAML uses indentation for structure and does not allow tab characters for it. Check that the line shown uses spaces and lines up with its siblings.