CSV ↔ JSON Converter
About CSV ↔ JSON Converter
Paste CSV to get a JSON array, or JSON to get CSV. Handles quoted fields with embedded commas and newlines correctly, and runs entirely in your browser — a spreadsheet export or customer list never has to leave your machine to be converted.
A CSV export from a spreadsheet or database and a JSON array describe the same rows of data, but almost nothing consumes both — a script wants JSON, a spreadsheet wants CSV. This converts either direction, with a real CSV parser rather than a naive comma-split, so a quoted field containing a comma, a quote, or an embedded line break survives correctly instead of being cut apart.
CSV values are text by default; the “Convert numbers and true/false” option turns plausible numeric and boolean-looking cells into real JSON numbers and booleans. It's deliberately conservative: a value with a leading zero (like a ZIP code "00501") or a leading "+" stays a string, because silently turning it into a number would lose real information a spreadsheet-literal reading wouldn't.
Converting JSON to CSV auto-detects the shape: an array of objects gets a header row built from the union of every object's keys (a row missing a key just gets an empty cell), an array of arrays gets plain rows with no header, and a single JSON object becomes a one-row CSV. A nested object or array inside a cell is written as its JSON text rather than silently dropped, since a CSV cell can only ever hold one flat value.
What you can use it for
- Convert a CSV export from a spreadsheet or database into JSON for a script or API call.
- Turn a JSON array from an API response into CSV to open in a spreadsheet.
- Convert data that uses semicolon or tab delimiters, not just commas.
- Check that a hand-edited CSV file's quoted fields are actually being parsed correctly.
- Reformat a one-off JSON object into a single-row CSV.
How it works, step by step
- 1
Pick a direction
CSV → JSON, or JSON → CSV.
- 2
Choose a delimiter
Comma, semicolon, or tab.
- 3
Paste your input
For CSV → JSON, choose whether the first row is a header and whether to infer numbers/booleans.
- 4
Copy or swap
Copy the result, or swap it into the input to convert back the other way.
Frequently asked questions
Does this handle a comma inside a quoted CSV field?
Yes. The parser understands quoted fields, so a field like "Doe, Jane" is read as one value, not split at the comma inside the quotes. The same applies to a quote-escaped "" or an embedded line break inside quotes.
Why does "00501" stay a string instead of becoming the number 501?
Type inference is deliberately conservative: a value with a leading zero (or a leading +) is left as text, because it's almost always an identifier — a ZIP code, an order number — not a number, and converting it would silently lose the leading zero.
What happens to a JSON object with a missing field when converting to CSV?
The header row is the union of every object's keys across the whole array, in first-seen order. A row that's missing a key just gets an empty cell in that column rather than shifting the other columns out of alignment.
What happens to a nested object or array in a JSON value?
It's written into the CSV cell as its JSON text, since a CSV cell can only hold one flat value. This is visible in the output rather than silently dropped.
Is my CSV or JSON uploaded anywhere?
No. Parsing and conversion both happen entirely in your browser — worth noting here specifically, since CSV exports often contain real customer, contact or financial data.