JSON Flatten & Unflatten

FreePrivateConfigurable separator

Convert nested JSON objects into flat key paths or rebuild flat paths into nested JSON instantly. Useful for forms, databases, config files, analytics, and data pipelines.

  • Flatten nested objects
  • Restore nested structure
  • Choose path separator
  • Private browser processing

Turn nested objects into path-based keys.

Path Separator
Previewuser.name
Nested JSON

Paste JSON input and run conversion.

Output
Ctrl+Enter Run

JSON Flatten & Unflatten Online

Flatten nested JSON into path-based keys or rebuild flat paths into nested objects instantly. Ideal for forms, config systems, spreadsheets, analytics, and data transformation workflows.

Where Is This Useful?

Form Fields
Map nested data to flat input names for HTML forms and APIs.
Databases
Store or query path-based key values in document or wide-column models.
Analytics
Normalize nested event payloads for metrics and dashboards.
Config Files
Convert between hierarchical settings and flat environment-style keys.

How to Use

  1. Choose Flatten or Unflatten.
  2. Select a path separator (dot, underscore, or slash).
  3. Paste JSON input.
  4. Click Run (or press Ctrl+Enter).
  5. Copy or download the result.

Example

Flatten: nested object to flat keys:

Input
{ "user": { "name": "Alice" } }
Output (dot)
{ "user.name": "Alice" }

Unflatten: flat keys back to nested JSON:

Input
{ "user.name": "Alice" }
Output
{
  "user": {
    "name": "Alice"
  }
}

Features

  • Flatten & unflatten modes
  • Configurable separators
  • Instant browser processing
  • Copy or download output
  • Mobile friendly
  • Clean formatted results

Frequently Asked Questions

Is this free?

Yes. The tool is free to use with no sign-up.

Is my data uploaded?

No. Flattening and unflattening run entirely in your browser.

What does flatten JSON mean?

It means turning nested objects into a single object whose keys encode the path, such as user.address.city.

What does unflatten mean?

It rebuilds nested objects from those path keys, using the separator you choose to split segments.

Can I choose separator characters?

Yes. Use dot, underscore, or slash—the preview in the tool shows how paths look.

What if keys conflict?

If two paths disagree (for example a value and a child path at the same segment), the tool reports a duplicate path conflict so you can fix the JSON.

Does it work on mobile?

Yes. Editors are sized for touch, mode switching is full-width, and copy/download are in an output sheet.

Can I download the result?

Yes. Download flattened.json or nested.json from the toolbar or mobile menu.

Related Tools