Skip to content
UniKit

Flat JSON Expander

Expand a flat JSON object with dotted a.b.c keys back into nested objects while keeping values untouched. Path conflicts are reported explicitly. Parsing stays in your browser.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Flat JSON input

Dots in keys describe nesting: a.b.c becomes {"a":{"b":{"c":…}}}. A path used both as a value and as an object ({"a":1,"a.b":2}) is rejected.

Expanded JSON

Dotted paths are expanded level by level and values are kept as-is; numeric segments become object keys, never array indexes.

Paste flat JSON to see the expanded result

What this tool does

  • Turn a flattened JSON file (dotted headers) back into nested objects for a config file
  • Convert CSV/Excel column names like user.name back into nested JSON

Example

Input

{"user.name":"Ada","user.age":37}

Output

{
  "user": {
    "name": "Ada",
    "age": 37
  }
}

The dots are only path separators; the output contains no dotted keys.

Frequently asked questions

Can a.0 become an array?

No. Numeric segments become ordinary object keys, so {"list.0":"a"} yields {"list":{"0":"a"}} rather than {"list":["a"]}. This tool only rebuilds object nesting.

When does a path conflict error appear?

When the same path is used both as a value and as an object, for example {"a":1,"a.b":2} or {"a.b":1,"a.b.c":2}. An empty key ({"":1}) is also rejected.

Is this the inverse of JSON flattening?

For most inputs yes: flattening extracts user.name, expanding restores it. Structures whose original keys contained dots, arrays and empty objects cannot be restored exactly.

Are values converted between types?

No. Values are moved as-is: strings stay strings and numbers stay numbers. Use the dedicated string-to-number or number-to-string tools for conversion.

Keywords:json expandflat json to nested

Related tools