All tools JSON Flattener ● Live Developer Tools

How JSON Flattener works

  1. Choose Flatten (nested → flat) or Unflatten (flat → nested) mode.
  2. Paste your JSON into the input box, or use the sample data already loaded.
  3. Optionally change the key separator (default is a dot).
  4. Click Flatten or Unflatten to process the JSON.
  5. Copy the output for use in your spreadsheet, script, or documentation.
  • Flatten a nested API response into dot-path keys for easy import into a spreadsheet or CSV.
  • Compare two nested JSON objects more easily by flattening both into simple key-value pairs.
  • Prepare nested config or log data for tools that expect flat key-value structures.
  • Reconstruct a nested JSON object from a flat key-value export using Unflatten mode.
  • Debug deeply nested API payloads by seeing every value's full path at a glance.

Your JSON is parsed and transformed entirely in your browser. Nothing is uploaded or stored.

  • Flattening arrays uses numeric index keys, which can make round-tripping large arrays verbose.
  • Very large or deeply nested JSON documents may take longer to process depending on your device.
  • Custom separators that appear naturally within your original key names can create ambiguous paths when unflattening.

JSON Flattener

JSON Flattener converts nested objects into flat key paths that are easier to scan, compare, export, or map into spreadsheets. It is useful for APIs, logs, and configuration files.

JSON Flattener Runs locally

Input JSON

Output

Guide

How to use

  1. Choose Flatten (nested → flat) or Unflatten (flat → nested) mode.

  2. Paste your JSON into the input box, or use the sample data already loaded.

  3. Optionally change the key separator (default is a dot).

  4. Click Flatten or Unflatten to process the JSON.

  5. Copy the output for use in your spreadsheet, script, or documentation.

Scenarios

Use cases

  • Flatten a nested API response into dot-path keys for easy import into a spreadsheet or CSV.

  • Compare two nested JSON objects more easily by flattening both into simple key-value pairs.

  • Prepare nested config or log data for tools that expect flat key-value structures.

  • Reconstruct a nested JSON object from a flat key-value export using Unflatten mode.

  • Debug deeply nested API payloads by seeing every value's full path at a glance.

Good to know

Limitations & Privacy

Private by design

Your JSON is parsed and transformed entirely in your browser. Nothing is uploaded or stored.

  • Flattening arrays uses numeric index keys, which can make round-tripping large arrays verbose.

  • Very large or deeply nested JSON documents may take longer to process depending on your device.

  • Custom separators that appear naturally within your original key names can create ambiguous paths when unflattening.

FAQ

Frequently asked questions

Is JSON Flattener free to use?

Yes. The tool is free and runs directly in your browser with no account required.

Does this tool upload my data?

No. Processing happens locally in the browser tab. Your JSON is never sent to a server.

How are nested arrays flattened?

Array items become keys with their numeric index appended, e.g. user.tags.0 and user.tags.1 for the first and second items in a tags array.

Can I change the separator between key segments?

Yes — the default separator is a dot (.), but you can set it to any short string (e.g. an underscore or a colon) using the Separator field.

Can I reverse the process and rebuild the nested JSON?

Yes — switch to Unflatten mode and paste dot-notation flat JSON to reconstruct the original nested object structure.

Why would I flatten JSON before exporting to a spreadsheet?

Spreadsheets work best with flat columns. Flattening nested JSON into dot-path keys turns each unique path into a column header, making the data easy to import into a CSV or spreadsheet tool.

What happens to null or boolean values when flattening?

They're preserved as-is at their flattened key — flattening only restructures the key paths, it doesn't change the underlying values' types.

Is there a limit to how deeply nested JSON I can flatten?

There's no hard-coded depth limit, but extremely deep or large JSON documents may take longer to process depending on your browser and device.