CSV to JSON Converter

Paste spreadsheet data, get JSON objects instantly. Auto-detects commas, semicolons, tabs and pipes; handles quoted fields correctly. Nothing is uploaded.

Advertisement

How to convert CSV to JSON

  1. Paste your CSV into the left box, export it from Excel or Google Sheets with Save as CSV, or just copy a block of cells; a copy from a spreadsheet is tab-separated and still works.
  2. Leave the Delimiter on Auto-detect and it figures out commas, semicolons, tabs or pipes for you; switch it manually if a file uses an unusual separator.
  3. Keep First row is header checked so column names become the JSON keys. Uncheck it when the file has no header, you then get an array of arrays instead of an array of objects.
  4. The JSON updates live as you type. Grab it with Copy output or Download .json.

Why turn a spreadsheet into JSON?

Business data lives in spreadsheets, but code does not read spreadsheets, it reads JSON. The moment you need to seed a database, feed a form's dropdown, mock an API, or import a client's contact list into an app, you have to reshape those rows and columns into objects a program can loop over. Doing it by hand is tedious and doing it with a quick split(',') script breaks the first time a value contains a comma. This tool does the reshaping correctly and instantly, in the browser, so you can paste 5,000 rows and get clean JSON without writing a parser.

It follows the CSV standard (RFC 4180), which is where the real value is. A field wrapped in double quotes can itself contain commas, line breaks and escaped quotes, "Torvalds, Linus" stays a single value rather than splitting into two columns, and "She said ""hi""" decodes to She said "hi". Every cell comes out as a JSON string, so numbers keep any leading zeros (useful for zip codes and product SKUs) instead of being silently mangled. If you later need to hand the data back to a non-technical colleague, run the result through JSON to CSV to return it to spreadsheet form.

How CSV rows map to JSON objects

The mental model is simple: the header row names the fields, and every row after it becomes one object. Given this CSV,

name,role,city
Ada,Engineer,London

, you get [{"name":"Ada","role":"Engineer","city":"London"}]. Three columns become three keys; one data row becomes one object inside the array. Add more rows and you get more objects. A few rules worth knowing: a header cell that repeats will collide (keep column names unique), an empty cell becomes an empty string "", and a row with fewer values than the header simply leaves the trailing keys empty. Uncheck First row is header and there are no keys at all, each row becomes a positional array like ["Ada","Engineer","London"], which is handy when the source genuinely has no headings.

Frequently asked questions

How do I convert a CSV file to JSON?

Open the file in any text editor, or use Save as CSV from your spreadsheet, then copy the contents into the input box. The JSON appears instantly, each row becomes an object keyed by the header row.

Does it handle semicolons and tab-separated data?

Yes. Auto-detect recognises commas, semicolons, tabs and pipes, and you can force a specific delimiter from the menu. Data copied straight out of Excel or Google Sheets is tab-separated, which is why a plain paste from a spreadsheet just works.

What if a value contains a comma or a line break?

As long as that value is wrapped in double quotes, which spreadsheets do automatically on export, it is parsed as one field. Embedded commas, escaped double quotes (written as "") and multi-line values inside quotes are all handled per RFC 4180.

My numbers keep their leading zeros, why are they strings?

Every cell is emitted as a JSON string so nothing is lost: a zip code like 01970 or an ID like 007 keeps its leading zeros instead of turning into a number. If you need real numbers or booleans, cast the fields in your code after importing.

What if my file has no header row?

Uncheck First row is header. Instead of objects with named keys, each line becomes a positional array, so Ada,Engineer,London becomes ["Ada","Engineer","London"].

Is my spreadsheet data uploaded anywhere?

No. Conversion runs entirely in your browser, so customer lists, exports and other business data never leave your machine, safe to use even with sensitive records.

Advertisement

More free developer tools