JSON Flatten / Unflatten
Convert nested JSON to dot paths, or rebuild nested objects from flattened keys.
Convert nested JSON to dot paths, or rebuild nested objects from flattened keys.
JSON Flatten converts nested objects and arrays into a simple object whose keys describe each path. Dot-separated paths make deeply nested values easier to search, export, map, or use in flat databases and spreadsheets. Choose Unflatten to rebuild a nested JSON structure from those paths.
The conversion runs entirely in your browser and preserves strings, numbers, booleans, null values, arrays, and empty containers. Use this JSON flatten and unflatten tool when moving data between APIs, CSV workflows, configuration systems, and applications that expect flat key-value records.
Flattened keys use dot notation, which is easy to read and copy into mapping rules. Review keys containing dots or unusual names when moving data between systems, and test a small sample first when an external application uses a different path convention.
After flattening, you can inspect individual paths without expanding the whole document. After unflattening, validate the rebuilt JSON and compare it with the expected structure, especially when arrays contain multiple records or when an empty object is meaningful.
Flattening is useful when a system expects dot-separated key paths, spreadsheet columns, search fields, or environment-style configuration values. Unflattening rebuilds nested objects from those paths. Test arrays, empty objects, nulls, and keys that already contain dots because different systems use different path conventions. Validate the rebuilt JSON and compare it with the original sample before applying a transformation to production data.