Skip to content
hateitall

JSON Unflatten

Turn a flat key list from a spreadsheet, form or translation file back into structured JSON.

Processed locallyIn: JSONOut: JSON

Loading tool…

How to use json unflatten

  1. Paste an object whose keys are paths, such as {"user.name": "Asha"}.

  2. Set the separator your keys use.

  3. Choose whether number segments become array positions.

  4. Copy or download the nested JSON.

What this tool does

  • Reads both items.0.name and items[0].name styles.
  • Names the exact two keys that conflict, such as a holding a value while a.b needs it to be an object.
  • Fills gaps in array positions with null and tells you how many.
  • Safe with unusual keys such as __proto__, which are stored as plain data.

How the result is verified

The nested result is flattened again and compared with your input keys and values; the tick appears when they match exactly.

Frequently asked questions

What if two keys conflict?

The tool stops and names both keys, for example when "a" is 1 and "a.b" is 2, because one value cannot be both a number and an object.

Can I keep numeric keys as object keys?

Turn off 'Number segments make arrays' and a key like codes.404 becomes {"codes": {"404": ...}}.

Is my data uploaded to a server?

No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.

Nested JSON to one level of dot path keys, and back

JSON→ JSONLight on device

Beautify or minify JSON with your choice of indentation

JSON→ JSONLight on device

Turn CSV rows into a JSON array of objects, with types and nesting

CSV · TSV→ JSONLight on device

Collapsible, searchable tree view that stays fast on large files

JSON→ PathLight on device