Kharabeesh
On-device ع

JSON Flatten & Unflatten

Turn nested JSON into a flat object with keys like address.city or items[0].name, or rebuild the original structure from flat keys. Handy for translation files, configs and spreadsheets.

Free, no sign-up Your data stays on your device Works offline after first open

The tool

Loading the tool…

How to use

  1. Paste JSON or drop the file.
  2. Choose Flatten or Unflatten.
  3. Pick the separator (usually a dot) and the array index style.
  4. Copy or download the result (flat output can also be a key/value table).

Privacy & how it works

Processes your data in the browser and stores nothing.

  • Engine: lightweight in-page code, no external libraries.
  • Works offline after you open it once.

Frequently asked questions

What is the difference between a.0 and a[0]?

Both mean the first item of array a. The [0] style is clearer and never clashes with a key named "0", so use it if your keys are numbers (like years).

Why did unflatten give an array instead of an object?

With dot style, a numeric part (like items.0) becomes an array index. If you want it as an object key, use bracket style or another separator.

What happens to an empty {}?

It stays as the value {} or [] at its key so it comes back unchanged after unflattening.

Related tools