YAML to JSON

Convert YAML into JSON with correct types for numbers, booleans, and null values, so you can paste the result straight into an API request body.

YAML to JSON conversion parses a practical YAML subset and writes the result as JSON. Scalars are typed on the way through, so yes, no, true, false, null, and tilde all become JSON values.

Output

                

Paste or type something above.

Questions about yaml to json

Which YAML features are not supported?
Anchors, aliases, tags, and multi-document files are rejected with a clear message rather than guessed at.
Are booleans converted correctly?
Yes. true, false, yes, no, on, and off become JSON true and false, and null or an empty value becomes null.
Why did a line fail to parse?
Every YAML line has to be a mapping entry or a list item. The error names the line number and what was expected there.