CSV ↔ JSON converter
Convert CSV to JSON or JSON to CSV directly in your browser.
How to use
Paste CSV and press CSV → JSON to get an array of objects, one per row, keyed by the header row. Paste a JSON array of objects and press JSON → CSV to get a table back, with a header made from every key that appears, in the order each first appears. The delimiter can be a comma, a semicolon or a tab, and applies in both directions. Files from countries that use the comma as the decimal separator are often separated by semicolons: choose Semicolon for those, or each line is read as a single field or split at its decimal commas.
A field that contains the delimiter, a quote or a line break must be wrapped in double quotes, and a quote inside it is written twice: "She said ""hi""" is read as She said "hi". Blank lines are skipped, so the header is the first line with content; missing cells become empty strings and cells beyond the last header are dropped. An empty header name becomes column_ plus the column’s position, such as column_3, and a repeated one gets the first free suffix (name, name_2), so no column overwrites another. A quote that is never closed is reported as invalid CSV.
Every CSV value becomes a JSON string, including numbers and true or false: CSV has no types, so the converter does not guess. That is what keeps leading zeros (007, postcodes, phone numbers) and long identifiers intact; convert the fields you need to numbers in your own code. Going the other way, numbers and true or false are written as they are, null becomes an empty cell, and a nested object or array is written as JSON text inside its cell.
JSON → CSV accepts an array of objects or a single object, which becomes one row. An array of plain values gives a single column called value. Rows are separated by line breaks, and a cell is quoted only when it needs to be. Everything runs in your browser; nothing is uploaded.
Example
The header row becomes the JSON property names. The two data rows become two objects.
name,email / Ana,[email protected][{"name": "Ana", "email": "[email protected]"}]id / 007"id": "007": the leading zeros stay, because values are kept as text."Lisbon, Portugal" in one fieldStays one value; without the quotes it would be split into two columns.name;price / Pão;1,20 with Semicolon[{"name": "Pão", "price": "1,20"}]. With Comma chosen instead, the header becomes one field, name;price, and the row is read as Pão;1: the 20 falls into an extra cell and is dropped.[{"a":1,"tags":["x","y"]}] → CSVa,tags and then 1,"[""x"",""y""]": the array is written as JSON text and quoted, because it contains quotes and a comma.
Frequently asked questions
Why did my IDs lose their leading zeros?
Not in this converter: it keeps every CSV value as text, so 007 stays 007. The zeros are usually lost earlier, when the file is opened and saved in a spreadsheet that reads 007 as the number 7. Keep identifiers, postcodes and phone numbers as text from end to end.
Why do some CSV files use semicolons?
Because in much of Europe and South America the comma is the decimal separator, so it cannot also separate fields. Those exports use a semicolon instead — the same format with a different delimiter, which is why a file that opens cleanly in one place looks like a single column somewhere else. Choose Semicolon before converting it.
Why are the numbers strings in the JSON?
Because CSV does not say which values are numbers. Reading 007, 1e3 or a 20-digit identifier as a number would change it, so the converter leaves that decision to you.
Can it convert nested JSON?
Partly. Each object becomes a row and each top-level key a column; nested objects and arrays are written as JSON text inside their cell rather than spread over extra columns.
What happens to a quote inside a field?
It is doubled and the field is wrapped in quotes, as CSV requires: She said "hi" becomes "She said ""hi""".