Free · no sign-upConverts as you typeNothing uploaded

CSV to JSON converter

Paste a spreadsheet export and read it back as records. Quoted fields, embedded commas and semicolons are handled properly, and it converts back to CSV the same way.

Quoted fields, embedded commas and line breaksComma, semicolon, tab and pipe detectedLong IDs and leading zeros stay as stringsConverts back, with nested objects flattened
  1. Paste or dropAn export, a query result, a log. No upload, no button first.
  2. Check the readingThe delimiter it found, the header row, and any row that does not fit.
  3. Copy it or save itAs JSON, or back the other way as CSV.

Your CSV

Result

Nothing to show yet. Paste a table on the left and the records appear here.

Waiting for CSV. Everything below happens in this tab.

Nothing is uploaded. An export with names, emails or salaries in it is parsed on your own machine and is gone when you close the tab.

How to convert a CSV file to JSON

  1. Paste your CSV

    Drop it in the box, drag a .csv file onto it, or press Open file. There is no upload and no button to press first.

  2. Check the delimiter and the header row

    The delimiter is detected and named under the panel. The first row is read as the column names until you turn Header row off.

  3. Read it, then take it

    Switch to Table to see the rows as a grid, then Copy the JSON or Save it as a file. JSON to CSV runs the same way in reverse.

Why splitting on commas does not work

It is the first thing anyone writes, and the first real export breaks it. A field is allowed to hold the delimiter as long as it is quoted, so this file has two columns and not three:

name,note
Ada,"Keyboard, 88 key"

A quoted field may also hold a doubled quote standing for one character, "", and a line break, which means a single record can span three lines of the file. The only way through is one character at a time, tracking whether the cursor is inside quotes. That is what this tool does, and it is why a row count here sometimes disagrees with the number of lines your editor shows.

When a number stays a string

A CSV cell has no type. Something has to decide whether 007 is a number, and most converters decide yes, which quietly turns a product code into the digit 7. The rule here is one test: a value becomes a JSON number only if writing that number back out gives exactly the characters that arrived.

CellBecomesWhy
4242Round trips exactly. A quantity.
007"007"Would come back as 7. That is a code, not a count.
1.50"1.50"Would come back as 1.5. The trailing zero is a price format.
9007199254740993"9007199254740993"Past the safe integer range. A double cannot hold it.
TRUEtrueCase-insensitive, because that is what Excel writes.
(empty)nullAn absent value, not the empty string.
+44 20 7946"+44 20 7946"Not a JSON number at any point.

Turn Convert types off and every cell stays a string, including the empty ones. That is the safer setting when the JSON is going into something that will write the values back out.

Going the other way

JSON to CSV takes an array of objects, or an array of arrays. Nesting is the interesting part, because CSV has none: an object becomes dotted columns like ship.city, and a list becomes tags.0 and tags.1. The header is the union of every path found across all the records, in the order each first appeared, so a record missing a field leaves an empty cell rather than shifting the row.

Fields are quoted only where they have to be, and lines end with CRLF, which is what RFC 4180 specifies and what Excel expects. BOM for Excel adds a byte order mark to the saved file. Without it Excel reads a UTF-8 export as Windows-1252 and turns every é into é, which is the single most common complaint about CSV exports anywhere.

Switching direction keeps your work

Pressing JSON to CSV moves the result into the input box, so a round trip is two clicks. That is the fastest way to see what a conversion actually did to your data: convert, convert back, and compare the CSV you get with the one you started with.

Keyboard and files

Ctrl + Enter, or Cmd + Enter, copies the output without reaching for the mouse. Drag a .csv, .tsv or .json file onto the box to open it, and a .json file switches the direction on its own. Full screen moves the panel into the whole viewport, and Escape brings it back with your text where you left it.

Frequently asked questions

Is my spreadsheet uploaded anywhere?

No. There is no server to upload it to. The page is a static file and the parser runs in your own tab, so an export with names, emails or salaries in it never leaves the machine. Nothing is saved either, not even locally, so a reload loses your text.

Why did my ID column come out as a string?

Because turning it into a number would have changed it. A value becomes a JSON number only when writing that number back out gives the same characters that came in. 007 would come back as 7, 1.50 as 1.5, and a 19-digit order ID as a rounded float, so all three stay strings. Quantities convert; identifiers and formatted text do not. Turn Convert types off and everything stays a string.

What happens to a row with more or fewer fields than the header?

It is kept, and you are told. A short row gets the missing keys with an empty value, and the preview table marks those cells as missing rather than empty. A long row keeps its extra cells under names like column_9. The count of rows that do not match the first row appears under the verdict, because a ragged file is usually a quoting problem worth looking at rather than a fact about the data.

What does it do with nested objects when converting JSON to CSV?

It flattens them into dotted columns. An object of {"ship":{"city":"Cork"}} becomes a column called ship.city, and a list becomes tags.0 and tags.1. CSV has no nesting, so the alternatives are worse: writing the branch as JSON text puts a document inside a cell, and dropping it loses data. Columns are the union of every path found, in the order they first appear.

My file opened as a single column. What went wrong?

The delimiter guess was wrong, which happens on a file with one column of real data or with a lot of prose in it. Set Delimiter by hand from the list. Semicolon is the one to try first: Excel writes semicolons on any machine whose locale uses a comma for decimals, so a French or German export usually needs it.

What is the biggest file it will take?

10 MB from the Open file button, and the conversion itself is not capped below that. The preview table stops at 200 rows and 40 columns, because painting a 40,000-row grid makes the page stutter for no gain, and it says how much it left out. The output pane and the saved file are always complete.

Can I get JSON Lines, one object per line, instead of an array?

Not from this tool. It writes one JSON document, which is an array of records, and NDJSON is a different format read a line at a time rather than in one parse. If that is what you need, convert here and then split the array in your own code. Saying so is more use than an option that produces something almost right.

move openesc close