jellykit logojellykit

JSON Flatten & Unflatten

Flatten nested JSON objects and arrays into dot-separated keys or rebuild nested JSON structures.

Loading JSON Flatten & Unflatten in your browser — 100% client-side with zero uploads.

Related data tools

All Data tools

CSV to JSON

Convert CSV files or pasted tables into structured, formatted JSON arrays.

Data

JSON to CSV

Flatten JSON arrays and objects into clean, spreadsheet-ready CSV files.

Data

JSON Formatter

Beautify, minify, sort keys, and validate JSON syntax with clear error messages.

Data

JSON ↔ YAML Converter

Convert seamlessly between JSON and YAML with validation and indentation control.

Data

JSON to TypeScript Types

Infer clean TypeScript interfaces or type aliases from any JSON payload with nested models.

Data

JSON Diff Viewer

Deeply compare two JSON documents by path to highlight added, removed, and modified values.

Data

About JSON Flatten & Unflatten

Flatten deeply nested JSON objects and arrays into single-level key/value maps using dot, slash, underscore, or colon delimiters—and unflatten flat maps back into nested JSON.

How to use JSON Flatten & Unflatten

  1. 1

    Choose Flatten JSON or Unflatten JSON and pick your preferred key delimiter (such as . or /).

  2. 2

    Toggle whether arrays should be flattened by numeric index or kept intact.

  3. 3

    Copy or download the transformed JSON, or click Swap to round-trip the output.

Frequently asked questions

How does Unflatten know when to recreate an array versus an object?

When path segments are non-negative integers (like roles.0 and roles.1), Unflatten automatically reconstructs a JavaScript array at that branch.

When is flattening JSON useful?

Flattened key-value JSON is handy for i18n translation files, environment variable mapping, spreadsheet exports, and comparing deeply nested configs.

Does this tool guard against prototype pollution keys?

Yes. Keys containing __proto__, constructor, or prototype are safely skipped during unflattening.