Developer

Convert CSV to JSON

Paste a CSV, or load a file, and get a JSON array back. This is a real parser rather than a split on commas, so quoted fields containing commas, line breaks and doubled quotes all survive. The delimiter is detected from the first few lines unless you pick one.

Detection reads the first five lines and picks the character that splits them all into the same number of fields.

Minify when the output is going into a request body rather than into your eyes.

The file is read by your browser and never uploaded. Anything over 5 MB is refused, because the page would lock up.

Parsing

Conversion is deliberately strict: a value only becomes a number when printing it again gives back exactly the same characters, so 007 and 1.50 stay strings.

0Rows
0Columns
0JSON size

Why splitting on commas is wrong

The first version of every CSV reader is line.split(','), and it works until the data contains a comma. Then it keeps almost working, which is worse. Three features of the format break it:

The parser here is a character-by-character state machine, which is the only way to get all three right. It also tolerates the common deviations: bare CR, bare LF and CRLF all end a row, and a quote appearing in the middle of an unquoted field is treated as an ordinary character rather than an error.

Type conversion, and the strict rule that makes it safe

CSV has no types. Every field is text, so turning 42 into a number is a guess — a useful one, and the cause of a great deal of quiet data loss. The usual implementation calls the language's number parser and keeps whatever comes back, which is how ZIP code 01234 becomes 1234 and part number 1.50 becomes 1.5.

The rule used here is narrower: a field becomes a number only if converting that number back to text produces exactly the original characters. 42 passes. 007, 1.50, +44, 1e3 and any integer long enough to lose precision all fail the test and stay strings. true and false become booleans, an empty field becomes null, and everything else is left alone.

Dates are never converted, because JSON has no date type and the only thing worse than a string date is a wrong one. 03/04/2024 is March in the United States and April nearly everywhere else, and no parser can tell which from the file. Keep them as ISO-8601 strings and let the consumer decide.

The failure you should know about

One unmatched double quote destroys the rest of the file. From that character onward the parser thinks it is inside a quoted field, so delimiters and line breaks become ordinary text and everything collapses into one enormous value. This is the single most common way a CSV import goes wrong, and it usually comes from a field containing an inch mark or an apostrophe-style quote that was never escaped. The tool detects the state and says so, but it cannot guess where the quote should have been closed. Search the input for a lone " and fix it there.

Ragged rows are handled rather than rejected. A row with fewer fields than the header gets null for the rest; a row with more keeps the extras under column_N names. Both are reported, because both usually mean the file is damaged, not that it is unusual.

What this cannot do

It cannot fix encoding. By the time text is in the box it has already been decoded, so if you can see José the damage happened when the file was saved or opened — reopen the original as UTF-8 rather than trying to repair it here. A byte order mark at the very start is stripped, which stops an invisible character from gluing itself to your first column name.

It does not stream. Everything is held in memory, so file loading is capped at 5 MB and pasted text has no formal limit but the same practical one. It also has no notion of a schema: nested structure cannot be reconstructed from flat columns, so address.city arrives as a key with a dot in it, not as a nested object.

Frequently asked questions

Does the file I choose get uploaded?

No. It is read with the browser’s FileReader, which hands the text straight to the page. There is no server involved and no network request, which is also why the size limit exists — everything happens in this tab’s memory.

Why did my ZIP codes keep their leading zeros?

Because the converter only makes a number when the number prints back as the same characters, and 1234 is not 01234. That is deliberate. If you genuinely want numbers there, switch off "Convert numbers and booleans" and cast the column downstream.

My file uses semicolons. Does that work?

Yes. Detection usually picks it up, and you can force it with the delimiter menu. Semicolons are standard in exports from Excel in locales where the comma is the decimal separator, so a European CSV with semicolons is not broken.

What happens to rows with a different number of fields?

They are kept. Short rows get null for the missing columns, long rows keep the extra values under column_N keys, and a note tells you how many of each were found. Nothing is silently dropped.

Can I get an array of arrays instead of objects?

Turn off "First row is the header" and every row becomes an object keyed column_1, column_2 and so on, including the first. There is no raw array-of-arrays mode, because the keys make the output far easier to work with in practice.

Last updated September 19, 2026