JSON flatten and unflatten
Flatten JSON to JSON Pointer values and rebuild it without losing array types.
Bookmark this page
Keep this page handy for next time.
- On a computer
- Press Ctrl + D, or Command + D on a Mac.
- On a phone or tablet
- Open your browser's menu or Share menu and look for Add Bookmark, Bookmark or Add to favourites.
A bookmark saves the page link. Save any tool results separately.
How to use this tool
- Flatten a JSON value into separate values and containers maps.
- Paths use JSON Pointer escaping, so slashes in keys are unambiguous.
- Paste that complete envelope in unflatten mode to rebuild the original structure.
Things to know
- Unflatten expects this tool's values/containers envelope, not arbitrary dotted keys. Prototype-modifying paths are rejected.
- Each text input accepts up to 5 MiB. Output is limited to 25 MiB and combined text settings to 1 MiB.
- Structured documents accept up to 128 nesting levels and 250,000 values; query and schema modes have additional limits.
You might also need
More in data & csvJSON to TypeScript types
Infer TypeScript types from a JSON example, including nested arrays and objects.
JSON and JSON Lines converter
Convert a JSON array to JSONL or combine JSON Lines into an array.
JSON structural diff
Compare JSON values by structure and show changed JSON Pointer paths.
CSV deduplicator
Remove duplicate CSV records using all columns or selected key columns.
CSV joiner
Join two CSV tables on a shared key using inner or left joins.
JSON formatter and validator
Validate and format JSON without rounding large integers.
CSV and JSON converter
Convert CSV records to JSON and JSON records to quoted CSV.
JSON and YAML converter
Convert between JSON and YAML while retaining large integer values.
JSON Patch generator and applier
Generate RFC 6902 patches or safely apply a local patch to JSON.