Why convert between JSON and CSV?
JSON and CSV sit at opposite ends of the data world. JSON is how software talks: nested, typed, self-describing, and unreadable at a glance once it grows past a screenful. CSV is how everyone else looks at data: a flat grid that opens in Excel or Google Sheets, that a finance team can sort and chart, that a database can bulk-import in one statement. Work constantly pushes data across that border — an API response that a colleague wants "as a spreadsheet", a spreadsheet that a developer needs as JSON seed data, a database export destined for a JSON API. A converter is a small tool doing a deceptively exact job, because CSV looks trivial and is not: the moment a value contains a comma, a quote or a line break, naive split-on-commas code produces the wrong table, silently.
How to use this tool
- Paste a JSON array (or a single object) and press JSON → CSV — or paste CSV text and press CSV → JSON.
- Pick the delimiter your data uses. Comma is the default; European Excel exports often use semicolons, and tab is safest for pasting into spreadsheets.
- For CSV → JSON, leave Infer types ticked unless every value must stay a string (IDs with leading zeros are protected either way).
- Check the table preview — it is rendered from the actual conversion, so what you see is exactly the grid a spreadsheet will open — then Copy result.
The rules that make CSV harder than it looks
CSV has an undeserved reputation as a trivial format because the simple
cases are simple. The specification that matters (RFC 4180, and the
behaviour of Excel and the major parsers) adds three rules on top of
"fields separated by commas". First, a field containing the delimiter,
a double quote or a line break must be enclosed in double quotes.
Second, a double quote inside a quoted field is written twice.
Third, a quoted field may contain line breaks, so one logical row can
span several physical lines — which is why counting lines is not
counting rows. This converter implements all three in both directions,
so a value like say "hi", loudly survives the round trip
intact instead of splitting your table into phantom columns.
Types are the other fault line. CSV has none: every cell is text.
JSON → CSV therefore flattens — numbers and booleans are written as
their text form, empty cells represent missing keys and nulls, and
nested objects or arrays are written as compact JSON inside the cell
(readable, and recoverable, but no longer a grid). CSV → JSON must
guess, and this tool guesses conservatively: only clean numeric
literals, true, false and null
change type. 007 stays a string, because it is a code,
not a quantity.
Examples
This JSON:
[{"name":"Ada","role":"admin","logins":318},{"name":"Bo","role":"editor","logins":97}] becomes this CSV — and the same CSV converts straight back:
name,role,logins
Ada,admin,318
Bo,editor,97
If one of those names contained a comma — "Lovelace, Ada" —
the field would be quoted automatically, and the table would still
have exactly three columns on every row.