Using the converter
Paste YAML on the left and read JSON on the right. There are no settings, because YAML has no options worth offering here. Swap the boxes to go the other way.
When something cannot be read, the error names the line. That is the whole design: a converter that half-reads a config file and hands back plausible JSON is worse than one that stops and points.
What it reads, and what it refuses
It handles mappings, sequences, nesting by indentation, quoted and bare scalars, comments, flow collections like [a, b] and {a: 1}, and both kinds of block scalar with their chomping indicators.
It refuses anchors and aliases, explicit tags, merge keys, complex keys and files holding more than one document. Each refusal names the line and says what it found. Those features exist to let a file refer to itself, and quietly dropping a reference would produce JSON that looks right and is missing data.
Indentation must be spaces. YAML forbids tabs for indentation outright, which surprises people who have spent a career using them everywhere else.
The Norway problem
YAML 1.1 treated yes, no, on and off as booleans. A list of country codes written in YAML would therefore turn NO into false, and Norway quietly vanished from a lot of software.
It is not the only casualty. A version number like 1.20 reads as the float 1.2, and a MAC address or a git hash made only of digits and letters can read as a number in the wrong base. Configuration languages that guess at types will eventually guess wrong about yours.
The YAML 1.2 core schema fixed the boolean case by recognising only true and false, and this converter follows it. Paste no on the left and JSON gets the string "no" back. If you want a boolean, write true.
Related conversions
JSON to YAML is the same converter pointed the other way, and it has more to say about why JSON is already valid YAML. XML to JSON covers the older configuration format that YAML mostly replaced.
For a flat table rather than a tree, JSON to CSV is the one you want.
Questions
How do I convert YAML to JSON?
Paste the YAML above and the JSON appears as you type. Nothing is uploaded, so a config file with credentials in it stays on your machine.
Why is "no" a string and not false?
This follows the YAML 1.2 core schema, where only true and false are booleans. YAML 1.1 read no as false, which is how Norway's country code NO used to turn into a boolean.
Does it support anchors and aliases?
No, and it says so rather than guessing. An anchor lets one part of a file refer to another, and silently dropping that reference would give you JSON that is quietly missing data.
Can I convert a file with several documents in it?
Not in one go. Split it on the --- markers and convert each document separately, or the second document would overwrite the first.






