JSON Flatten/Unflatten
Flatten nested JSON objects to dot-notation or unflatten back.
About JSON Flatten/Unflatten
JSON Flatten converts deeply nested JSON objects and arrays into a flat dictionary of dot-notation key paths and their scalar values, and Unflatten reverses the process by reconstructing the full nested hierarchy from flat key paths. For example, nested object {a:{b:{c:1}}} flattens to the flat key a.b.c with value 1. Flat JSON is dramatically easier to search, store in relational or key-value databases, compare with diff tools, process with jq, and use as environment variable mappings where nested structure is not supported.
How to Use
Paste any nested JSON into the input area and click Flatten to convert it to a flat dot-notation dictionary — arrays are represented with numeric indices like items.0.name. Use the separator selector to switch between dot, slash, or double-underscore path separators depending on your target system's requirements. To reverse, paste a flat JSON dictionary and click Unflatten to reconstruct the full nested structure, correctly handling numeric keys as array indices.
Common Use Cases
- Data engineers flattening nested JSON event records from Kafka or Kinesis streams into dot-notation key/value pairs for insertion into columnar databases like BigQuery, Redshift, or ClickHouse
- DevOps engineers converting nested Kubernetes ConfigMap or Helm values YAML into flat KEY=VALUE environment variable format for injection into container environments
- API developers simplifying deeply nested third-party API responses — like Salesforce or Stripe objects — into flat structures for easier mapping to ORM models or database columns
- QA engineers flattening two JSON objects and comparing their sorted flat key lists to precisely identify which nested fields were added, removed, or changed without a full JSON diff tool
- Frontend developers and localization engineers converting nested i18n JSON translation files into flat namespace.key.subkey format for compatibility with translation management platforms like Phrase or Lokalise