Convert YAML into JSON, with exact error lines when the indentation goes wrong.
Loading the tool...
How to use YAML to JSON
Paste your YAML.
Read the JSON on the right. If the YAML has a problem, you see the line and column.
Copy or download the JSON.
About YAML to JSON
YAML is pleasant to write and easy to get subtly wrong, because indentation is part of the syntax. Converting it to JSON is a good way to see what your parser actually understood: if the JSON looks wrong, the YAML was not what you thought it was.
Anchors and aliases are resolved, so a block that was reused with &default and *default shows up in full. If the file holds several documents separated by ---, you get an array with one item per document.
Frequently asked questions
Why did "yes" turn into true?
In YAML 1.1, yes, no, on and off are booleans. If you meant a string, put quotes around the value.
What happens to comments?
They are dropped, since JSON cannot hold comments.
Can I convert a Kubernetes file with several documents?
Yes. Multi-document files become a JSON array, one entry per document.
Why do I get a tab error?
YAML forbids tabs for indentation. Replace them with spaces and the error goes away.
Does it handle dates?
Plain dates like 2026-11-13 are read as timestamps and come out as ISO strings in the JSON.