JSON to YAML Converter
Turn JSON into readable YAML configuration.
Turn YAML configuration into JSON, anchors and all.
Yes. An anchor (&name) is recorded, an alias (*name) is expanded where it appears, and a merge key (<<: *name) pulls the anchored mapping in as defaults, with any key written explicitly on the mapping winning. That is what makes docker-compose.yml and .gitlab-ci.yml files convert correctly, since both lean on merge keys to share blocks between services or jobs.
Because this converter follows YAML 1.2, where only true and false are booleans. Under the older YAML 1.1 rules, yes, no, on and off were also booleans, which is how the Norwegian country code NO became false in countless config files. YAML 1.2 fixed that, and so does this tool.
Explicit tags (!!binary, !Custom), complex mapping keys (? and :), and the %YAML and %TAG directives. Each is reported as a named error naming the line, rather than being parsed into something that looks plausible but is wrong. Tabs used for indentation are rejected the same way, since YAML forbids them and the mistake is easy to miss.
A stream separated by --- markers converts to a JSON array with one element per document, in order. A single document converts to that document alone rather than a one-element array.
Two megabytes, and 500,000 nodes after aliases are expanded. The node cap matters because a few lines of nested aliases can expand into an enormous structure - the classic billion-laughs document - which would otherwise hang the tab. Both limits report a named error rather than truncating quietly.
Turn JSON into readable YAML configuration.
Format, indent and inspect JSON with clear error reporting.
Turn a spreadsheet export into JSON records.
Your input is saved in this browser so a refresh does not lose it. Tools handling credentials are never saved.