CSV to JSON Converter (and JSON to CSV)
Paste a CSV table, or one copied from Excel or Google Sheets, and get it as JSON instantly: an array of objects with the column names as keys. The other way works too: from a JSON array to a CSV ready to open in Excel. Quotes, commas inside a field and line breaks are read as the standard says, and it all happens in your browser.
Works anywhere in the world, wherever you are.
From Excel or Google Sheets: select the cells, copy them and paste them here (they arrive tab-separated).
Rows converted
Waiting for data
Paste your data and the conversion shows up instantly.
JSON
Your data never leaves your device: the conversion runs in your browser, it is not in the Share link, is not saved and is not sent to any server or to analytics. Close or reload the page and it is gone.
Related tools
E-invoice XML Viewer
Money
CFDI, UBL (Peppol, SUNAT, DIAN) and Facturae made readable, to PDF or Excel.
OpenJSON Formatter and Validator
Everyday
Pretty-print, minify and validate JSON, with the exact error line.
OpenBase64 Encoder and Decoder
Everyday
Text or files to Base64 and back, with accents and emoji right.
OpenRemove Duplicate Lines
Everyday
Keep each line of a list just once, in its order.
OpenSort List
Everyday
A→Z, Z→A, natural order, by length, reversed or shuffled.
OpenAbout this calculator
How to use it
Choose "CSV → JSON" or "JSON → CSV" and paste your data. The result shows up underneath as you type, with how many rows and columns came out. "Copy result" puts it on your clipboard and the download button saves it as .json or .csv.
From CSV to JSON the separator is detected for you: the tool tries comma, semicolon, tab and pipe, and keeps the one that splits the first rows into the same number of columns. If it guesses wrong, pick it yourself. If the first row holds the column names, each row becomes an object with those keys; if not, choose "Is data" and each row becomes an array.
With "Detect numbers and true/false", plain figures come out as numbers, true and false (any case) as booleans, and empty cells as null. If your file uses a decimal comma (4,50), choose "Comma" as the decimal mark. Without that option everything comes out as text, which is the safest choice.
Example
A CSV saved by an Excel that uses decimal commas (as in Spain or much of South America), with these three lines: “name;town;zip;price”, “Ana;Ponce;00716;4,50” and “"Pérez, Luis";San Juan;00901;12”. The tool detects the semicolon, and with "Detect numbers" and the decimal comma it gives 2 rows and 4 columns: [{"name":"Ana","town":"Ponce","zip":"00716","price":4.5},{"name":"Pérez, Luis","town":"San Juan","zip":"00901","price":12}].
Notice two things. The comma in "Pérez, Luis" does not split the field, because it is in quotes. And the ZIP codes stay text: turning 00716 into a number would drop its leading zeros, so the tool does not do it.
The other way, the array [{"name":"Ana","note":"said \"hi\""},{"name":"Luis","note":null,"age":40}] gives a CSV with 3 columns: “name,note,age”, “Ana,"said ""hi""",” and “Luis,,40”. The "age" column shows up even though only the second object has it, the null becomes an empty cell and the quotes in the text are doubled, as the format requires.
Semicolons, Excel and accents
In countries where the comma is the decimal mark, Excel saves CSV files with semicolons ("4,50;12"), because the comma is already taken. That is why automatic detection tries both. In the United States and Puerto Rico, where the decimal mark is a point, the comma is the norm.
When going from JSON to CSV you can choose comma, semicolon or tab. If whoever opens the file uses Excel with a decimal comma, choose semicolon so each value lands in its own column.
Excel on Windows opens UTF-8 CSV files with accents and ñ garbled (you see "Pérez" instead of "Pérez") unless the file starts with an invisible mark called a BOM. With "With BOM", which is on by default, the downloaded file carries it; what you copy does not, so it does not get in the way when you paste it into another program.
How the CSV is read
The tool follows RFC 4180: fields are split by the separator and rows by a line break; a field in double quotes may hold separators, line breaks and quotes, which are written doubled (""). It accepts Windows, Mac and Linux line breaks, drops a leading BOM if there is one and skips blank lines.
If a row has more or fewer fields than the first one, or quotes are out of place, the conversion goes on and warns you with the row and line number. Extra columns get a name like "field_5", missing ones are left empty, and if two columns share a name, the second becomes "name_2".
Your data stays with you
The conversion runs entirely in your browser. Your data is not sent to any server, is not in the "Share" link, is not saved on your device and is not recorded in the site's statistics; the "Share" link only carries the options you picked. Reload or close the page and it is gone.
Important limitations
- Number detection only recognizes plain figures: 12, -3.5, 1e3 or, with a decimal comma, 4,50. Thousands separators (1,500), currency signs ($5), percentages and leading zeros stay text, as do numbers with more digits than JavaScript holds exactly.
- Dates come out as whatever text the CSV has; they are not converted to any format.
- From JSON to CSV, nested objects and arrays are written as JSON inside a cell; they are not flattened into columns like "address.town".
- If a value starts with =, +, - or @, Excel may treat it as a formula when it opens the CSV. The tool does not change your data: check the file if it comes from a source you do not trust.
- Separator detection looks at the first 50 rows. For a very large file, the page shows the first 100,000 characters of the result; copy and download carry the full result.
Frequently asked questions
This calculation runs in your browser and is never sent to a server. Your last values may be saved on your device only, for convenience. Results are estimates and are not financial, tax, accounting or legal advice.