JSON to CSV Converter
Turn an array of objects into a spreadsheet-ready CSV file.
JSON describes a tree; CSV describes a grid. Converting between them means answering a question the data does not answer for you: what happens to values nested two levels down, and to arrays that have no fixed length. This converter flattens nested objects into dotted column names, joins arrays into a single cell, and quotes every value that needs it — then hands you a file Excel, Numbers or a database import will read without complaint.
How it works
Paste your JSON
An array of objects, or an object that contains one.
Choose delimiter and line endings
Semicolons and CRLF for European Excel; commas and LF elsewhere.
Download or copy
The header row is built from every key found across all records.
Flattening a tree into a grid
A CSV row is a flat list of values, so anything nested has to be given a column of its own. This converter joins the path with dots: {"user": {"city": "Bern"}} becomes a column named user.city. The convention is widely understood, survives a round trip through a spreadsheet, and keeps the original structure legible in the header row.
Arrays are the harder case, because their length varies between records. Splitting them into tags.0, tags.1 and so on produces a column count driven by whichever record happens to have the most entries, and a table full of blanks. This tool joins array values into one cell separated by semicolons instead — lossy for nested arrays of objects, which are stored as JSON text, but predictable for the tags, categories and ID lists that arrays usually hold.
Records rarely share the same keys. The header is therefore built by walking every record and collecting every key that appears anywhere, in order of first appearance. A record missing a key gets an empty cell rather than a shifted row, which is what keeps the grid aligned when the JSON is the output of an API that omits null fields.
The parts of CSV that are not standardised
CSV has a specification, RFC 4180, and almost nothing follows it exactly. It defines the comma as the separator, CRLF as the line ending, and double quotes around any value containing a comma, a quote or a newline — with an embedded quote written twice. This tool follows all of that, which is why a value like Smith, John comes out as "Smith, John".
The separator is where regional settings intervene. In locales that use a comma as the decimal mark — most of continental Europe — Excel writes and expects semicolons instead, so a comma-separated file opens as a single column per row. If your CSV lands in one column in Excel, switching the delimiter to a semicolon usually fixes it in one step.
Encoding is the other recurring problem. This tool writes UTF-8, which is correct, but Excel on Windows assumes the regional code page unless the file starts with a byte order mark. Without it, accented and non-Latin characters arrive mangled. The BOM option adds those three bytes; leave it off for imports into databases and scripts, which usually treat them as part of the first column name.