CSV to JSON Converter

CSV to JSON Converter

Updated August 27, 2026

A comma is not the only separator. Excel in Europe exports semicolons, and a leading zero in a zip code is data until JSON turns it into a number.

A comma is not the only separator. Excel in Europe exports semicolons, and a leading zero in a zip code is data until JSON turns it into a number.

Paste the CSV. Check the first object. If 06401 became 6401, the types are wrong, not the file.

How to use it

  1. RFC 4180 is comma-separated, " to quote, doubled "" for a literal quote. If your file uses ;, that's EU Excel. Switch the delimiter before you convert.
  2. Keep leading zeros as strings. Zip codes, phone numbers, account IDs. A number has no leading zero.
  3. A header row becomes keys. Two headers with the same name collide. Empty headers become field2, field3, not useful names.
  4. NDJSON (one JSON object per line) is not CSV. If every line already starts with {, you're in the wrong tool.

When it breaks

  • A newline inside a quoted field is legal CSV and looks like a broken row. Don't split on \n yourself.
  • Mixed line endings (CRLF from Windows Excel) usually parse. A stray UTF-8 BOM in the first key does not. If the first key is \ufeffName, strip the BOM.
  • This does not make a schema. Types are guessed. Guessing is how zip codes die.
Delimiter

CSV

JSON

Features

  • RFC 4180 quoted fields: commas and newlines inside quotes stay in the cell
  • Delimiter detect for comma vs EU Excel semicolon vs tab
  • Every cell stays a string so ZIP codes keep leading zeros
  • Output is a JSON array of objects, not NDJSON (one object per line)

Common Use Cases

  • Turn a German Excel CSV (semicolon, decimal comma in the UI) into JSON
  • Keep 07701 as a string instead of the number 7701
  • See how a quoted comma does not split a column
  • Know you got an array, not newline-delimited JSON, for fetch().json()

A comma is not the only separator

A comma is not the only separator. Excel in Europe exports semicolons, and a leading zero in a zip code is data until JSON turns it into a number.

Paste the CSV. Check the first object. If 06401 became 6401, the types are wrong, not the file.

RFC 4180 is comma-separated, " to quote, doubled "" for a literal quote. If your file uses ;, that's EU Excel. Switch the delimiter before you convert. Keep leading zeros as strings. Zip codes, phone numbers, account IDs. A number has no leading zero.

A header row becomes keys. Two headers with the same name collide. Empty headers become field2, field3, not useful names. NDJSON (one JSON object per line) is not CSV. If every line already starts with {, you're in the wrong tool.

Examples

Valid - RFC 4180 quoted comma
name,city
"Lovelace, Ada",London
Valid - EU Excel semicolon
id;stadt
1;München
Valid - Leading zeros kept as strings
zip,name
07701,Ada
Valid - Not NDJSON (this is the array we emit)
[{"zip":"07701","name":"Ada"}]
Invalid - Unclosed quote
name,city
"Ada,London

Frequently Asked Questions

Why did 06401 become 6401?

A comma is not the only separator. Excel in Europe exports semicolons, and a leading zero in a zip code is data until JSON turns it into a number. Paste the CSV. Check the first object. If 06401 became 6401, the types are wrong, not the file. Keep leading zeros as strings. Zip codes, phone numbers, account IDs. A number has no leading zero.

My file uses semicolons. Is that CSV?

RFC 4180 is comma-separated, " to quote, doubled "" for a literal quote. If your file uses ;, that's EU Excel. Switch the delimiter before you convert.

What happens to headers? Is NDJSON CSV?

A header row becomes keys. Two headers with the same name collide. Empty headers become field2, field3, not useful names. NDJSON (one JSON object per line) is not CSV. If every line already starts with {, you're in the wrong tool.

Why does a quoted newline look like a broken row?

A newline inside a quoted field is legal CSV and looks like a broken row. Don't split on \n yourself. Mixed line endings (CRLF from Windows Excel) usually parse. A stray UTF-8 BOM in the first key does not. If the first key is \ufeffName, strip the BOM. This does not make a schema. Types are guessed. Guessing is how zip codes die.

Common Mistakes

A newline inside a quoted field is legal CSV and looks like a broken row. Don't split on `\n` yourself.
Mixed line endings (CRLF from Windows Excel) usually parse. A stray UTF-8 BOM in the first key does not. If the first key is `\ufeffName`, strip the BOM.
This does not make a schema. Types are guessed. Guessing is how zip codes die.

Tips

  • Keep a header row. Headerless CSV becomes column_1, column_2.
  • If Excel opened the CSV and wrecked leading zeros, convert from the original export, not the resaved xlsx.
  • Do not paste NDJSON logs into a CSV converter.