Convert YAML to JSON, with every loss listed

JSON cannot hold comments, tags, shared anchors, timestamps or non-string keys. This converter writes the closest JSON and tells you exactly what changed.

Default. true/false/null/ints/floats resolve per YAML 1.2.2 core; yes/no/on/off and dates stay strings.

YAML input

JSON output

Converting…

Exact numbers

Integers are written digit for digit, even beyond 2^53, and floats keep their written precision. A warning reminds you that many JSON parsers will round very large integers.

What is reported

Blockers: values JSON cannot represent at all (.inf, .nan, complex keys, keys that collide after conversion). Consent-required: data that changes type or disappears (comments, custom tags, timestamps, binary). Information: aliases expanded, merge keys applied, multiple documents wrapped in an array. Recursive aliases cannot be expanded and stop the conversion.

Questions

Are merge keys (<<) applied?
Only when you enable merge keys in the profile. Then explicit keys win over merged ones, as the merge-key specification describes; otherwise << stays an ordinary key.
What happens with multiple documents?
They become a JSON array, or you can convert only the first document. Either choice is reported.

Other tools