JSON to CSV / CSV to JSON Converter

Turn JSON arrays into CSV tables and CSV files back into JSON — with a live table preview, quoting done properly, all in your browser. Free, no sign-up — runs locally in your browser.

Your work is auto-saved in this browser only, so a refresh won't lose it. Nothing is uploaded.

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

  1. Paste a JSON array (or a single object) and press JSON → CSV — or paste CSV text and press CSV → JSON.
  2. Pick the delimiter your data uses. Comma is the default; European Excel exports often use semicolons, and tab is safest for pasting into spreadsheets.
  3. For CSV → JSON, leave Infer types ticked unless every value must stay a string (IDs with leading zeros are protected either way).
  4. 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.

Frequently asked questions

What JSON shape can become a CSV?

A table needs rows and columns, so the input must be an array of objects (each object is a row, its keys become the columns) or an array of arrays. The columns are the union of all keys across all objects, in the order they first appear; a key missing from a row becomes an empty cell. A single object is treated as a one-row table. Nested objects and arrays inside a cell are written as compact JSON text.

How are commas and quotes inside values handled?

By the CSV quoting rules (RFC 4180): any field containing the delimiter, a double quote or a line break is wrapped in double quotes, and double quotes inside it are doubled. So the value say "hi", loudly is written as "say ""hi"", loudly". Excel, Google Sheets and every serious CSV parser read this back exactly.

Does CSV to JSON guess the types of my values?

With "Infer types" ticked, yes — carefully. true and false become booleans, null becomes null, and clean numbers like 42 or 2.5 become numbers. Strings that merely look numeric but carry information in their form — leading zeros like 007, for example — stay strings, because turning them into numbers would destroy data. Untick the option to keep every cell a string.

Why did the converter reject my CSV?

The usual causes are a header row with a duplicated column name (JSON objects cannot repeat a key, so the tool stops instead of silently overwriting a column) and rows with more fields than the header — almost always an unquoted comma inside a value. The error message names the row so you can find it. Rows with fewer fields than the header are padded with empty cells.

Can I use a semicolon or tab delimiter?

Yes — choose it above before converting. Semicolon CSV is the default in many European Excel locales, and tab-separated values (TSV) paste cleanly into spreadsheets. Just make sure the delimiter you pick matches the file you are converting from.

Is my data uploaded anywhere?

No. Both conversions and the table preview run in your browser on this page. Nothing is sent to a server, which matters when the CSV is an export of customer or financial data.

Related tools

Related guides