YAML to JSON Converter

Works offlineNothing is uploadedFree, no sign-up

Converted in this tab — your configs never leave it.

Paste YAML, read JSON — nested maps and lists by indentation, typed scalars, comments stripped, inline collections handled. The dark corners of YAML — anchors, block scalars, multi-document streams — are refused by name instead of guessed at, because confident wrong JSON is worse than an honest no.

Indentation as syntax, honestly parsed

YAML's whole bet is that indentation you can see should be the structure you get. The converter takes the bet literally: it measures every line's indent, builds the map and list nesting from those measurements alone, and reports the first line where the levels stop making sense — which is precisely how you debug a config that 'looks right'.

The refusals are the feature. Every YAML horror story — the Norway problem, the billion-laughs anchor bomb, the sexagesimal port number — lives in the corners this tool declines by name. What it accepts, it converts exactly; what it cannot convert exactly, it does not touch.

Frequently asked questions

What YAML does this cover — and what does it refuse?

Covered: what config files actually contain — nested maps, lists, list-of-maps, quoted and plain scalars, numbers, booleans, null, comments, inline [a, b] and {k: v}. Refused, by name: anchors and aliases, block scalars (| and >), multi-document streams, and tab indentation, which YAML itself forbids.

Why did my version number become something else?

YAML's plain scalars are typed by guessing: 1.10 is the number 1.1, no becomes false in old parsers, a country code like NO once famously turned into a boolean. The cure is quotes — "1.10" stays a string — and the converter honours them, which is why the output shows exactly where quoting mattered.

Why refuse anchors instead of expanding them?

Anchors are YAML's reference system, and half-supporting them is the worst option: an alias expanded wrongly produces valid-looking JSON with silently duplicated or missing config. A tool this size either implements references completely or names them as unsupported — this one names them, with the line number.

Is the JSON equivalent to the YAML?

For everything accepted, yes — structure, order of keys, and scalar types survive. Two things do not exist in JSON at all: comments and your formatting. That is one-way loss inherent to the format pair, and it is why the conversion belongs in the YAML-to-JSON direction for machines, not the reverse for humans.

Related tools