CSV to JSON Converter
Convert CSV or TSV to JSON with delimiter detection, header handling, and optional, lossless type detection.
Runs in your browser. Your input stays on your device.
Turn a JSON array into a CSV file. Nested objects can be flattened into columns, numbers are kept exactly as written, and cells that could run as spreadsheet formulas are neutralized by default.
Opens a file from your device. The file is read in your browser and is not uploaded.
Showing a large file in the editor can make the page slow or unresponsive for several seconds.
0 characters · 0 B
0 characters · 0 B
Privacy: This tool runs in your browser. Your input is processed on your device and is never uploaded to a server.
Converted with the default options. The address is flattened, the tags array is written as JSON, the large ID and -75.50 are unchanged, and the formula in note is prefixed with a quote.
[
{
"id": 9007199254740993,
"name": "Ayesha Khan",
"address": { "city": "Lahore", "zip": "54000" },
"tags": ["admin", "beta"],
"balance": -75.50,
"note": "=HYPERLINK(\"http://example.com\")"
},
{
"id": 2,
"name": "Liam O'Brien, Jr.",
"address": { "city": "Dublin" },
"verified": true
}
]id,name,address.city,address.zip,tags,balance,note,verified
9007199254740993,Ayesha Khan,Lahore,54000,"[""admin"",""beta""]",-75.50,"'=HYPERLINK(""http://example.com"")",
2,"Liam O'Brien, Jr.",Dublin,,,,,trueSpreadsheet programs such as Excel and Google Sheets treat a cell that starts with =, +, -, or @ (and, in some programs, a tab or carriage return) as a formula. If the JSON came from users, a value like =HYPERLINK("http://example.com") could run as a formula when someone opens the CSV, for example to send data to another site. With protection on, such text cells get a single quote in front, so spreadsheets show them as plain text. Numbers from the JSON, like -5, are never changed. The trade-off: when you open the CSV in Excel, protected cells show the leading apostrophe as part of their text, for example '=1+1, and other programs see it as part of the value too. If you trust the data, or the CSV is meant for a database or a script rather than a spreadsheet, turn the option off.
With Flatten with dot notation on, nested objects become separate columns named by their path, such as address.city and address.zip. With it off, each nested object is written as JSON text in a single cell. Arrays are always written as JSON text, because a list does not map cleanly onto a fixed set of columns.
Excel often assumes a legacy encoding when it opens a CSV file, so UTF-8 text shows up as unreadable characters. Excel compatible adds a UTF-8 byte order mark at the start of the downloaded file, which tells Excel to read it as UTF-8. Most other programs do not need it. The mark is added to the download only, not to the copied text.
No. The JSON is read with a parser that keeps every number exactly as written, so an ID like 9007199254740993 or a price like 1.50 appears in the CSV character for character. Converters built on JavaScript’s JSON.parse would round that ID to 9007199254740992 and print 1.50 as 1.5.
Every key that appears in any object, in the order the keys first appear. When an object is missing a key, that cell is left empty, and null values are written as empty cells too.
Convert CSV or TSV to JSON with delimiter detection, header handling, and optional, lossless type detection.
Format and beautify JSON with your choice of indentation, and find syntax errors by line and column.
Check JSON for errors with line, column, and code context, and catch duplicate keys and unsafe large numbers.