Skip to content
Jellykit

CSV to JSON Converter

Convert CSV to JSON and JSON back to CSV, with delimiter detection, correct quoting and leading zeros kept in postcodes and ids.

  • Runs on your device
Loading tool

About CSV to JSON Converter

Turn a spreadsheet export into JSON for an API or script, or flatten a JSON array into CSV that opens cleanly in a spreadsheet. The delimiter is detected automatically, quoted fields with commas and line breaks are handled properly, and the swap button reverses the conversion.

Values stay as text unless you ask for numbers and booleans to be recognised, so postcodes and ids with leading zeros survive intact.

How it works

  1. CSV is parsed according to RFC 4180: fields may be wrapped in double quotes, and a doubled quote inside a field stands for a literal quote.
  2. With a header row, each line becomes an object keyed by the column names, in the order of the columns. Without one, each line becomes an array. Blank lines are skipped; a line of empty fields is kept as a row.
  3. Going the other way, the columns are the union of every key in the JSON array, in the order they first appear. Numbers are copied digit for digit, so long ids are not rounded. Nested objects and arrays are written as JSON text inside the cell.
  4. When writing CSV, text that starts with =, +, - or @ gets a leading apostrophe, so a spreadsheet shows it instead of running it as a formula. Signed numbers such as -5 are left alone, and the result line says how many cells were changed.

Questions

Why are my numbers in quotes in the JSON?

CSV has no types, so every value is text by default. Turn on "Detect numbers and booleans" to convert values such as 42, 3.14 and true. Dates, and whole numbers too long to store exactly, stay as text. Leave it off for data like postcodes or phone numbers where leading zeros matter.

Why does a cell in my CSV start with an apostrophe?

A spreadsheet runs any cell that starts with =, +, - or @ as a formula, which is a risk when the JSON came from somewhere else. The apostrophe makes it plain text. If you need the values exactly as written, for example phone numbers that start with +, turn off "Escape spreadsheet formulas".

Which delimiters are supported?

Comma, semicolon, tab and pipe. Automatic detection picks whichever one splits the first rows most consistently, which copes with European exports that use semicolons.

What JSON shape can be converted to CSV?

An array of objects, an array of arrays, or a single object, which becomes one row. Anything else has no natural table form.

Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.