JSON Flattener
Flatten nested JSON objects and arrays into flat, dotted-path columns, preview the result, and export it as CSV — with a configurable separator and array-join text.
What this tool does
A JSON array of records, a single object, or a newline-delimited JSON (NDJSON) file all work the same way here: your file's schema (including nested objects and arrays) is read locally, flattened into a table, previewed, and exported as CSV. This is the tool to reach for when you need control over how flattening works; JSON to CSV does the same thing with fixed, sensible defaults and no configuration.
How flattening actually works
- A nested object becomes dotted columns:
address: { city }becomes a column namedaddress.city(the separator is configurable). - A list of plain values (strings, numbers, booleans) is joined into one text column with the separator you choose. A missing value inside the list is shown as the literal text
nullrather than silently disappearing — a real behavior of the underlying join function this tool works around explicitly, not an assumption. - A list of objects, or a list that mixes different types of values, is not flattened into more columns and never split into extra rows: it is kept as its own compact JSON text, so you can see exactly what was there instead of a guessed, possibly wrong shape.
Missing key vs. explicit null
Verified directly rather than assumed: once your file's records are read into a table, a field that was entirely absent from one record and a field that was explicitly set to null in another both appear the same way — as a missing (NULL) value in that column. JSON itself can tell these two cases apart; a flat table cannot.
Browser-local processing
Flattening runs as a SQL query against your file inside DuckDB, running as WebAssembly in your browser. Your file is not uploaded. See the privacy page for what is and is not verified about that.
Exporting
The download is the flattened table as CSV, using the same safe export path as every other CSV export on this site: a text value that would be read as a formula by a spreadsheet program (starting with =, +, -, @, a tab or a carriage return) is prefixed with a quote character so it opens as plain text instead — including a value that only became a top-level cell because it came from deep inside a nested structure.
Want to check the flattened data for problems?
This tool only flattens; it does not check the result for missing values, duplicates or formatting problems. Export it here, then open the CSV in the CSV Data Quality Analyzer — no new tool needed, it already works on any CSV.
Large files
This tool warns you above roughly 100 MB, warns more strongly above roughly 500 MB, and declines to open a file above roughly 2 GB rather than risk crashing the tab.
Related tools
- JSON to CSVConvert JSON arrays to CSV, flattening nested fields.
- JSON ViewerValidate, search and explore any JSON document as a virtualized tree.
- JSON FormatterPretty-print or minify JSON with clear, position-aware validation errors.
- JSON to ParquetConvert JSON records to typed Parquet, with nested structure preserved.