Cryonel

JSON Flatten / Unflatten

Flatten deeply nested JSON into single-level dot-path keys (handy for spreadsheets or env-style config), or rebuild nested JSON from flat keys.

Advertisement

How to use it

Paste nested JSON and click Flatten to get dot-path keys like "a.b": 1 (array indexes become path segments too, e.g. "a.c.0": 10). Paste flat keys and click Unflatten to rebuild the nested structure — numeric path segments are rebuilt as arrays.

Frequently Asked Questions

What happens to empty objects or arrays?

An empty object or array has no leaf keys to flatten, so it's kept as-is at its own path.

Does flatten → unflatten always round-trip?

Yes, for standard JSON keys. Keys that already contain a literal dot will be ambiguous when unflattened, since dots are used as the path separator.

Related Tools