Skip to content
Logo Any Help Me

JSON to CSV Converter: Both Directions

Delimiter

Turning Records Into Rows and Back

JSON and CSV both hold tabular data, but only one of them was designed for it. CSV is flat by definition: a header row and values beneath it, with no way to express a nested object or an array inside a cell. JSON handles nesting effortlessly and, in the specific case of an array of flat objects, maps onto CSV cleanly.

This converter goes both directions, with comma, semicolon and tab delimiters, and reports the row count it produced.

How to Convert

Pick the direction first, since the input pane expects a different format in each mode.

  1. Choose the direction: JSON to CSV, or CSV to JSON.
  2. Paste your data. For JSON to CSV, an array of objects gives the most useful result.
  3. Set the delimiter. Comma is standard, semicolon is common in locales that use a comma as a decimal separator, and tab avoids both problems.
  4. Read the row count shown with the output as a quick check that everything was parsed.
  5. Copy the output once the row count matches what you expected.
  6. Check that headers match what you expected, they come from the keys of the first object.

What the Converter Does With Awkward Data

Going from JSON to CSV, headers are taken from the union of keys across the objects, and a value that a given object lacks becomes an empty cell. Any value containing the delimiter, a quote or a newline is wrapped in double quotes with internal quotes doubled, which is the standard CSV escaping rule. A nested object or array has no flat representation, so it is serialised rather than spread across columns.

Coming back the other way, values are coerced: text that looks like a number becomes a number, `true` and `false` become booleans, and empty cells become empty strings. That is usually what you want and occasionally not, a postal code with a leading zero or a long numeric identifier will be read as a number and lose its leading zero or its precision. Where those matter, convert and then correct the affected columns.

Choosing a Delimiter

Which separator to use, and what goes wrong with each.

DelimiterBest forCommon problem
CommaThe default; widest tool supportBreaks in locales using comma decimals
SemicolonEuropean locales, Excel exports thereNot the default in most parsers
TabData containing commas and semicolonsInvisible; easily lost when pasted

If a spreadsheet opens your file with every row crammed into one column, the delimiter is almost always the reason, the file used one separator and the application expected another. Switching to tab avoids the ambiguity at the cost of a format that is harder to inspect by eye.

Limits Worth Knowing

CSV has no type system and no formal specification that every tool agrees on. Whether the file has a header, how quotes are escaped, whether line endings are CRLF or LF, and what encoding it uses are all conventions rather than rules, which is why the same file can behave differently in two applications. Where the receiving system offers a documented import format, that is more reliable than assuming CSV means one thing.

Deeply nested JSON is the case CSV genuinely cannot represent. An array of flat objects converts cleanly; anything with objects inside objects needs flattening first, either by choosing the fields you want or by writing them out as dotted paths. Everything here runs in your browser, so nothing you paste is transmitted or stored.

Frequently Asked Questions

What JSON shape converts best to CSV?
An array of flat objects, where each object has the same keys. That maps directly onto a header row and one row per object.
What happens to nested objects?
They have no flat representation, so they are serialised into the cell rather than spread across columns. Flatten the data first if you need separate columns.
Which delimiter should I use?
Comma unless your data or locale conflicts with it. Semicolon is common in European locales, and tab avoids both problems at the cost of being invisible.
Why did my postal code lose its leading zero?
Values that look numeric are coerced to numbers when converting CSV to JSON. Codes with leading zeros and long identifiers need correcting afterwards.
How are commas inside values handled?
Any value containing the delimiter, a quote or a newline is wrapped in double quotes, with internal quotes doubled, the standard CSV escaping rule.
Why does my spreadsheet put every row in one column?
A delimiter mismatch: the file uses one separator and the application expects another. Re-export with the delimiter your spreadsheet expects.
Is my data sent anywhere?
No. Conversion happens entirely in your browser and nothing you paste is transmitted or stored.

Explore more in Developer

View all →