Using the converter
Paste JSON on the left. The columns are the keys, in the order they first appear, and every object becomes a row. Swap the boxes to read a CSV back into JSON.
Nested values decides what happens to an object inside an object. A column per leaf gives you user.name and user.id, flattened with dots. Keep as JSON in one cell leaves the structure intact inside a single field, which is what you want if the file is going somewhere that will parse it again.
Going the other way, Dotted headers decides whether u.name and u.age stay as two flat keys or rebuild {"u": {"name": …, "age": …}}. Columns numbered tags.0 and tags.1 come back as an array. It's off at first, because a spreadsheet's own headers can have dots in them (No., v1.2) that were never paths. Turn it on to send a file through JSON to CSV and back and get the same JSON.
Separator covers the two things people call CSV that use a semicolon or a tab instead. Reading CSV sets whether 12 comes back as a number or as text.
Quoting is the part that goes wrong
A field holding a comma has to be quoted, or the row grows a column. Quotes inside a field are doubled. A newline needs quoting too, and then the file has a record spanning two lines, which breaks anything that reads it line by line.
This converter does all three, in both directions. The reader is a character-by-character pass rather than a split on commas, because a split on commas is wrong the moment any field contains one.
What it can't fix is ragged data. A short row is padded with empty strings rather than shifted, and a row longer than the header loses the extra fields, because there is nothing to call them.
Nobody standardized CSV until 2005
CSV ran for decades with no specification at all. RFC 4180 arrived in October 2005 and is careful about what it claims: it is an Informational RFC that documents "the format that seems to be followed by most implementations" rather than defining it.
So files disagree. The RFC says records end with CRLF, and plenty of files end their lines with a bare newline instead. It says fields may be quoted, and some writers quote everything. Excel picks its separator from your locale, so a French machine writes semicolons and a CSV mailed across a border stops parsing.
Don't trust a CSV's separator until you've looked at its first line. Separator has a Semicolon option for that French file.
Related conversions
JSON to YAML keeps the nesting that CSV has to flatten away, and it's the better fit for configuration files. JSON to XML does the same for anything that has to go into an older system.
If your JSON is going into a string in source code rather than into a file, JSON escape is the one you want.
Questions
How do I convert JSON to CSV?
Paste the JSON above. It needs to be a list of objects, or a single object, because CSV columns come from keys and bare values have none.
What happens to nested objects?
By default each leaf becomes its own column, named by the path that reaches it, so user.name and user.id. You can switch to keeping the whole nested value as JSON inside one cell.
Can I turn a flattened CSV back into nested JSON?
Yes. Swap to CSV to JSON and set Dotted headers to Rebuild nested objects. A header can't be a value and a parent at once, so a file with both u and u.name stops with an error naming the two columns. Empty objects and arrays don't survive the trip, since JSON to CSV writes them as an empty cell.
Why is my field wrapped in quotes?
Because it contains the separator, a quote or a line break. RFC 4180 says such fields should be quoted, and any quote inside the field is doubled.
Does the order of columns matter?
Columns appear in the order the keys are first seen, so the first object sets the shape and later objects only add to it. A key missing from an object gives an empty cell.
Is the CSV safe to open in Excel?
Cells are written exactly as they are in the JSON, so a value starting with =, +, - or @ is read as a formula when Excel or Google Sheets opens the file. OWASP calls this CSV injection. If the data came from strangers, put a single quote (') in front of those values before anyone opens the file in a spreadsheet.
Sources
- RFC 4180: Common Format and MIME Type for Comma-Separated Values (CSV) Files
- Microsoft Support: Import or export text (.txt or .csv) files
Added . Last updated and reviewed . What's new






