Free YAML to JSON Converter (and Back)
Paste YAML to get JSON, or JSON to get YAML — anchors resolved, errors pinpointed by line and column.
How to use / FAQ
Does it handle anchors, aliases, and multi-document files?
Anchors (&name) and aliases (*name) are resolved during conversion, so the JSON contains the actual repeated values — JSON has no reference syntax. A stream with multiple documents separated by --- converts the first document and tells you how many it found.
Why does "no" stay a string instead of becoming false?
This converter follows the modern YAML 1.2 specification, where only true and false are booleans. Older YAML 1.1 parsers infamously read unquoted no, yes, on, and off as booleans — the "Norway problem", where the country code NO turned into false. Going the other way, strings that could be misread are quoted defensively in the YAML output.
Why is my YAML invalid when it looks fine?
The usual culprits are inconsistent indentation (YAML requires spaces — tabs are not allowed for indentation), a missing space after a colon, or an unclosed quote or bracket. The error message points to the line and column where parsing stopped. Once converted, the JSON formatter can pretty-print and validate the result.
What gets lost converting YAML to JSON?
Comments, anchors and aliases as *structure* (their values are kept, the references aren't), custom tags, and the distinction between quoting styles. The data itself — mappings, lists, strings, numbers, booleans, null — survives intact, which is what matters for config files and API payloads.
Is my data uploaded anywhere?
No. Both directions run entirely in your browser — safe for config files that contain hostnames, keys, or internal settings.