Flatten JSON
Turn a nested document into one flat list of paths and values. Every leaf gets a single row with a dot-notation key, which is what you want for a spreadsheet or for scanning what a document actually contains.
What flattening produces
Nested objects become dotted paths and array elements get bracketed indices, so the result reads the same way the path generator writes it.
{"user": {"name": "Ada", "langs": ["py", "js"]}}
user.name "Ada"
user.langs[0] "py"
user.langs[1] "js"CSV export
A flat list of records exports as CSV for a spreadsheet. Values containing commas, quotes or newlines are quoted and escaped properly.
Values that a spreadsheet would treat as a formula - anything starting with =, +, - or @ - are prefixed so they are shown as text. This matters when the JSON came from somewhere you do not control: without it, a crafted value in a scraped document can execute when the exported file is opened.
CSV wants a list of records: an array of objects becomes a header row plus one row per object, with the columns being the union of every key that appears. A single nested object has no natural table shape, so flatten it first and read the paths instead.
When flattening is the right move
Flattening is most useful when you want to know what a document contains rather than how it is arranged. A flat list of every path answers questions that a tree makes you hunt for: does this response ever include an error field, how deep does it actually go, which records are missing a value that the others have.
It is also the quickest way to hand JSON to something that does not speak JSON. Spreadsheets, older reporting tools and most log pipelines want flat keys, and dot-notation paths survive that trip intact.
The paths it produces are the same ones the path generator uses, so a row you find here can be pasted straight into a transform rule or turned into accessor code without editing.
Keys that contain dots
A key can itself contain a dot - "user.name" as a single key is legal JSON, and it appears more often than you would expect in analytics payloads. That would make a dotted path ambiguous, so such keys are written in brackets and quoted instead: ["user.name"] rather than user.name. The distinction matters, because the two describe different nodes.
Questions
- How do I flatten nested JSON?
- Load your document, open the Tools panel and choose Flatten. Every leaf value is listed with its dot-notation path.
- Can I export the result to CSV or Excel?
- Yes. The Flatten panel exports CSV, with quoting and escaping handled, and with spreadsheet formula characters neutralised so an untrusted document cannot run code when the file is opened.