Flatten Nested JSON Online (and Unflatten)

Flatten nested JSON to dot-notation keys or unflatten back to nested — arrays use index paths. Free, instant, 100% in your browser.

Input · json0 chars
Output · json0 chars

🔒 100% private: this tool runs entirely in your browser. Your data is never uploaded, stored or logged anywhere.

How to flatten json

  1. Paste nested JSON and press nothing — output is instant.
  2. Switch to Unflatten mode to rebuild nested structure from dot keys.
  3. Copy or download the result.

FAQ

How are arrays flattened?

Array elements become index paths: tags.0, tags.1, … Unflatten reconstructs them as arrays only when keys are numeric — otherwise plain objects.

What about empty objects?

Empty objects become a key with {} value; unflatten restores them as empty objects.

Why flatten JSON at all?

Flattened rows feed perfectly into CSV/spreadsheets, search indexing, and analytics pipelines that expect flat records.

Related tools