CSV to JSON Converter (and JSON to CSV)

Turn a spreadsheet export into JSON, or JSON back into a CSV you can open in Excel. Nothing is uploaded.


Table preview

How it works

Paste CSV or open a .csv or .tsv file. The parser follows RFC 4180, the closest thing CSV has to a standard: fields can be wrapped in double quotes, a quote inside a quoted field is written twice (""), and quoted fields may contain the delimiter or even line breaks. A byte-order mark from Excel is removed automatically.

With Auto-detect, the tool tries comma, semicolon, tab and pipe on the first rows and picks the one that gives every row the same number of fields. That matters because spreadsheets in much of Europe save CSV with semicolons, since the comma is the decimal separator there. If rows still have different lengths, or a quote is never closed, you get a warning that points at the row instead of silently wrong data.

Detect numbers, true/false, null turns 42 into a number and true into a boolean, but leaves values such as 007, phone numbers and IDs longer than JavaScript can hold exactly as text, so nothing loses its leading zeros or digits. Tick Dotted headers → nested objects and a column called address.city becomes {"address": {"city": …}}. You can output an array of objects, an array of arrays, or one array per column.

Going the other way, the tool accepts an array of objects, an array of arrays, an object of columns, or an object that wraps a single array (as many APIs return). Headers are the union of every key in first-seen order, nested objects are flattened to dotted columns, and arrays are written as JSON text in the cell. Guard against spreadsheet formulas prefixes cells that start with =, +, - or @ with an apostrophe, which stops a hostile value from running as a formula when someone opens the file (known as CSV injection). Add BOM helps Excel read accented letters correctly.

Questions

Is my file uploaded?

No. The file is read by your browser and converted in JavaScript on your device. Nothing is sent to the server, so it is safe for customer lists and exports.

Why does Excel show my CSV in one column?

Excel uses your system's list separator. In many European locales that is a semicolon, so choose Semicolon as the delimiter, or use Tab and save as .tsv.

Why are some numbers kept as text?

Values with leading zeros, like postcodes or 007, and integers longer than 15 or 16 digits would change if turned into numbers. Keeping them as text preserves them exactly.

How big a file can it handle?

Files of tens of megabytes convert in a second or two on a modern device. The preview shows the first 100 rows, and Copy and Download always include everything.

Related tools

Guides