YAML to JSON Converter
Turn YAML configuration into JSON, anchors and all.
Turn JSON into readable YAML configuration.
On the default setting, only when leaving it bare would change its meaning: it would otherwise resolve as a number, boolean or null, it starts with a YAML indicator character, it contains a colon-space or a space-hash, or it has leading or trailing whitespace. So "1.0" and "true" come back quoted while hello world does not. Choosing single or double quotes instead quotes every string value; keys are still quoted only when they need it.
As a block scalar with the | indicator, so the text stays readable instead of collapsing into one line full of \n escapes. The chomping indicator is chosen to match the original: |- when the string has no trailing newline, | for exactly one, |+ for more. Strings whose lines carry leading or trailing spaces fall back to quoting, because a block scalar would silently lose that whitespace.
No. Repeated structures are written out in full each time. JSON has no way to express a shared reference, so there is nothing in the input that says two identical blocks were ever meant to be the same node.
Yes for anything JSON can hold. Feeding the output into the YAML to JSON converter returns the document you started with, including strings that look like numbers, booleans or nulls - that round trip is asserted in this project test suite.
Turn YAML configuration into JSON, anchors and all.
Format, indent and inspect JSON with clear error reporting.
Flatten JSON records into a spreadsheet.
Your input is saved in this browser so a refresh does not lose it. Tools handling credentials are never saved.