JSON → YAML
Convert JSON into YAML with correct smart-quoting (numbers/booleans/dates/reserved words that look like other types get quoted), block or flow style, multi-line literal blocks, sort keys, and optional anchors for duplicate objects.
What this tool does
Paste JSON and get back YAML representing the same data — but with quoting decided correctly, not just "wrap every string," which is where a lot of converters quietly get it wrong.
The quoting bug most converters get wrong
YAML infers types from unquoted text: an unquoted no
becomes the boolean false, an unquoted
1.0 becomes the number 1, and an
unquoted 2026-01-01 becomes a date — even when the
original JSON value was the string "1.0" or
"no". A converter that quotes strings inconsistently
can turn a version number or a status field into a different type
the moment the YAML is read back. This tool checks every string
against the actual rules that make YAML reinterpret it — reserved
words, number-like and date-like patterns, leading YAML special
characters, and more — and quotes only the ones that need it, so a
round trip through YAML and back preserves the original value.
Handling multi-line strings properly
A string containing a newline can be forced into a single quoted
line with an escaped \n, but that is hard to read once
it is more than a sentence. With literal blocks turned on, a
multi-line string instead uses YAML's own block scalar syntax
(|), keeping it as actual readable lines in the
output rather than one long escaped string.
Deduplicating repeated structures
When the exact same object or array appears more than once in the JSON, turning on anchors factors the first occurrence out with a named anchor and replaces every later occurrence with a reference to it, instead of repeating the same structure in full each time it shows up.
Privacy
Parsing and conversion both happen in your browser. Nothing you paste, drop, or load from a file is sent to a server.