Data tool

JSON Flattener

Turn nested objects and arrays into flat paths, reverse them, or extract the exact paths, keys, and values you need.

Private by default. Your JSON stays in this browser tab.
JSON structure workbench
Ready for JSONLocal browser processing

JSON basics

What does it mean to flatten JSON?

Flattening converts a nested object into a single-level object. Each output key records the route to its original value, such as user.profile.name or items[0].sku.

Flat paths are useful for spreadsheets, translations, environment-style settings, logs, and systems that cannot accept nested objects. Unflattening rebuilds the nested structure when the path notation is unambiguous.

Nesteduser.name
{"user":{"name":"Ada"}}

→

{"user.name":"Ada"}

Workbench

Flatten, reverse, or extract one view

The same parser powers every mode, so arrays, empty containers, booleans, numbers, strings, and null values stay typed.

Reversible paths

Bracketed array indices preserve arrays during unflattening.

Delimiter control

Choose dot, slash, underscore, double underscore, or a custom separator.

Focused extraction

Switch the result to paths, keys, or primitive values without creating separate tools.

Depth limit

Keep deeper objects intact when only the first few levels need flattening.

Workflow

How to flatten or unflatten JSON

  1. 1
    Add JSON

    Paste data, open a file, or load the sample.

  2. 2
    Choose the direction

    Use Flatten for nested input or Unflatten for an object whose keys contain paths.

  3. 3
    Set path rules

    Pick a delimiter, array notation, and optional maximum depth.

  4. 4
    Review and reuse

    Inspect JSON, paths, keys, or values, then copy, download, or move the result back to the input.

Processing is local. The tool does not place your JSON in the page URL or send it to a conversion service.

Accuracy

Path collisions and other limits

Delimiter inside a key

A key such as first.name is ambiguous when dot is the delimiter. Choose a separator that does not occur in your keys.

Numeric object keys

A numeric segment can look like an array index. Bracket notation is the safest choice when arrays must round-trip.

Maximum depth

Values below the limit remain nested JSON values rather than being converted to text.

Review collision warnings before using an unflattened result in production data.

Common questions

JSON flattening questions

Does flattening change value types?

No. JSON strings, numbers, booleans, nulls, arrays, and objects remain JSON values.

Can I flatten arrays?

Yes. Choose bracket indices such as items[0] or delimiter indices such as items.0.

Can every flat object be unflattened?

No. Conflicting paths and keys containing the selected delimiter can be ambiguous. The tool reports collisions instead of silently overwriting data.

What is the difference between paths and keys?

Paths include the full location of leaf values. Keys lists object property names encountered anywhere in the document.