JSON to CSV & CSV to JSON Converter

JSON to CSV with flattening, any delimiter and an Excel BOM; CSV to JSON as objects, keyed objects, columns or JSON Lines, with sorting and 10 file encodings.

Result

The .csv download includes a UTF-8 byte-order mark so Excel opens accented text correctly. The link remembers these options, not your data.

Convert between JSON and CSV

Two converters on one page, each with its own text and settings. JSON → CSV takes a JSON array of objects and writes CSV with headers and proper quoting for commas and quotes. Choose your delimiter — comma, semicolon (for European Excel), tab (TSV), pipe, colon, space or caret, or type your own — and optionally flatten nested objects into dotted columns like address.city. Download the result as a .csv with a UTF-8 byte-order mark so Excel opens accented and CJK text without mojibake. “Turn this CSV back into JSON” hands the CSV you just made to the other side, and the other side has a button that hands its JSON back. Runs entirely in your browser.

CSV rows into a JSON array

Press CSV → JSON at the top and the other side turns CSV or TSV text into a clean JSON array right in your browser. Paste a spreadsheet export, a database dump, or an API response and get formatted JSON you can drop straight into code, a config file, or a request body. The parser follows RFC 4180, so quoted fields that contain commas, double quotes, or line breaks are handled correctly rather than splitting your rows apart.

Options you can control

Choose a delimiter — comma, tab (TSV), semicolon (common in European Excel), pipe, colon, space or caret, or type your own — or let auto-detect pick one from the first line. Keep “First row is a header” on to get an array of objects keyed by column name, or turn it off to get an array of arrays. Enable type conversion to turn cells like 42, true, and null into real JSON numbers, booleans, and null, while leaving identifiers such as 007 or zip codes as strings so nothing is corrupted. Everything runs locally, so even large or sensitive files never leave your device.

Four shapes, three ways to write them

The output does not have to be an array of objects. Pick an object keyed by a column and each row becomes the value under its own key, with the key column left out of that value; a key value that turns up twice is quoted back at you and the conversion stops, because keying on it would drop a row. Pick one array per column for {"name": ["Ann","Bob"]}. Turning the header off gives the fourth shape, an array of arrays with the first row included. Each of those can be written indented with two spaces, minified onto one line, or as JSON Lines — one record per line with no commas between them, downloaded as a .jsonl file. JSON Lines only makes sense for a list, so asking for it on a keyed or column-array shape is refused instead of quietly written as something else.

Shape the rows before they become JSON

Under More options, skip lines at the top drops a title row or an export banner sitting above the header, and auto-detect then reads the header line it lands on. Max rows caps the data rows and is applied after sorting, so a sorted limit is a real top-N. Sort rows by orders by any column — numbers as numbers, everything else in code-point order, and stable, so rows that tie keep the order the file had them in. A columns list picks and reorders the fields you want, and a name that is not in the file is reported by name. Leave an empty field out removes that key from the row object entirely instead of writing an empty string, and read NULL as null accepts NULL, Null or null without switching on full type conversion. Rebuild nested objects turns path headers such as address.city back into real nesting; a numeric segment like tags.0 rebuilds an array, the joining character can be ., / or _, and two headers that disagree about a path are reported rather than silently overwriting each other. It is the exact inverse of the flattening on the JSON → CSV side.

Files a spreadsheet actually exports

Open a .csv, .tsv or .txt of up to 10 MB and say which encoding it was saved in: utf-8, utf-16le, utf-16be, windows-1252, windows-1251, iso-8859-2, euc-kr, shift_jis, gb18030 or big5. Decoding is strict, so a CP949 export read as UTF-8 tells you which setting to change instead of handing back a page of question marks. A leading UTF-8 byte-order mark from Excel is stripped so the first key is exactly the column name, duplicate header names are disambiguated (a, a_2) instead of one column swallowing another, and the apostrophe a spreadsheet writer puts in front of a cell starting with =, +, - or @ is taken back off on the way in. Copy link puts every option in the URL and your data in none of it.

Frequently asked questions

What JSON shape does it expect?

An array of objects, e.g. [{"name":"Ann","age":30}]. The object keys become the CSV column headers. Nested objects can be flattened into dotted columns, or are otherwise written as JSON in the cell.

Will it open cleanly in Excel?

Yes. The .csv download includes a UTF-8 byte-order mark so Excel detects the encoding, and you can pick the semicolon delimiter that European Excel expects.

Does it accept JSON with comments or trailing commas?

Yes. If strict JSON.parse fails, it is retried as JSON5, so comments, trailing commas, unquoted keys and single quotes pass. A non-finite number is refused, naming its path.

Can the CSV tell a JSON null apart from an empty string?

Yes. Tick "Write null as the word null, not an empty cell" and a JSON null is written as null, while an empty string and a missing key stay empty cells, so the three no longer look the same. It is off by default, so the CSV you got before does not change. With nested objects flattened into dotted columns, a null inside them counts too; a null inside an array stays part of that cell's JSON. Going back, "Convert numbers, booleans & null" on the CSV → JSON side reads the word as null again.

Can it turn CSV back into JSON?

Yes. Press CSV → JSON at the top: that side reads CSV or TSV with its own delimiter, header, shape, sorting and encoding settings, and switching back and forth keeps the text you left on each side. “Turn this CSV back into JSON” sends the CSV you just made across, and “Turn this JSON back into CSV” sends an array of objects the other way.

Can I get an object keyed by an ID column instead of an array?

Yes. Set Output shape to “Object keyed by a column” and choose the column. Each row becomes the value under its own key, and the key column is left out of that value. If two rows carry the same key, the tool quotes the repeated value back and stops, because keying on that column would silently drop one of the rows.

How do I get JSON Lines (NDJSON) or minified output?

The Formatting menu offers indented (two spaces), minified onto one line, and JSON Lines — one JSON record per line with no commas between them, which downloads as a .jsonl file. JSON Lines needs a shape that is a list, so it is refused on the keyed and column-array shapes rather than written as something else.

My export has title rows above the header. Can I skip them?

Yes. “Skip lines at the top” under More options drops that many lines before anything is parsed, and auto-detect then reads the header line it lands on. “Max rows” caps how many data rows are kept and is applied after sorting, so choosing a sort column and setting max rows to 10 gives you a real top ten.

My Korean or Japanese CSV comes out as question marks. What do I do?

Open “More options”, set “Encoding of an opened file”, then open the file again. Ten encodings are offered: utf-8, utf-16le, utf-16be, windows-1252, windows-1251, iso-8859-2, euc-kr, shift_jis, gb18030 and big5. Decoding is strict, so a CP949 (EUC-KR) file read as UTF-8 is refused with a message pointing at that setting rather than handed back as replacement characters.