CSV and JSON Converter
Turn a spreadsheet CSV into JSON, or JSON into CSV, TSV or JSON Lines. See it as a table first, sort it, and pick and rename the columns on the way.
Runs on your device
1. Your data
Drop a file here
or
CSV, TSV, TXT, JSON or JSON Lines. Big files are fine.
It is read as you type. For files over a few MB, choosing the file is quicker than pasting.
Reading options
For CSV and TSV
One character, such as ~ or ^.
For JSON and JSON Lines
Only matters for CSV, and for the table.
Saving as JSON can turn these names back into nested objects.
2. Check the table
Choose, rename and reorder columns
Untick a column to leave it out. Give it a new name, or set what it holds: a column set to Numbers reads “£1,200.50” as 1200.5, and one set to Text keeps “007” as it is.
3. Save it
Each value in it must be different. Rows that repeat a key are left out, and you are told.
If Excel puts everything in one column, try a semicolon.
More CSV options
Windows line endings are what the CSV standard asks for, and every program reads them.
Numbers, dates and empty cells
How cells of a CSV become JSON values. Each column can also be set on its own under “Choose, rename and reorder columns”.
Numbers with leading zeros, like 007, and very long numbers, like card or phone numbers, are kept as text so nothing is lost.
The ending, such as .json, is added for you.
What you will get
Nothing to show yet.
How it works
Your file or pasted text is read by your own browser, in the background, and never sent anywhere. Nothing is uploaded and there is no account. Close the page and it is gone.
CSV files are read the way the standard (RFC 4180) says: cells in quote marks can hold commas, line breaks and doubled quote marks (""). The tool works out the separator (comma, semicolon, tab or pipe), whether the first row is column names, and whether the file is UTF-8 or an older Windows file, and tells you what it found. JSON can be a list of records, records inside something else (it finds them), or JSON Lines, and it is forgiving of comments and trailing commas.
Nested JSON in a spreadsheet
A spreadsheet has no room for nesting, so records are flattened: {"address": {"city": "Leeds"}} becomes a column called address.city, and a list such as "tags": ["tea", "cake"] becomes tags.0 and tags.1, or one cell reading tea; cake if you prefer (under Reading options). Saving as JSON again puts the nesting back.
Why are some numbers kept as text?
So nothing is lost. A number like 007, or a long one like a card or phone number, would lose its zeros or its last digits as a JSON number, so it stays as text. If a column really is numbers, set it to Numbers under “Choose, rename and reorder columns”. Dates are kept exactly as written unless you choose to change them.
Opening the CSV in Excel
Leave “Make it open properly in Excel” ticked, and letters such as é and ñ show correctly. If everything lands in one column, your Excel expects semicolons: choose Semicolon as the separator and save again.
How big a file can it take?
Files of tens of MB are fine, and are read in the background so the page stays usable. Hundreds of MB depends on your device’s memory; Chrome and Edge on a computer manage the most. If a file is too big, the tool says so rather than freezing.