CSV to JSON Converter

Paste CSV text or a copied spreadsheet to get tidy JSON, with the separator detected for you.

Worked examples

Keeping leading zeros

id,price on the first line, then 007,1.50

[ { "id": "007", "price": "1.50" } ]

Numbers such as 007 or 1.50 stay as text, so the leading zero and trailing zero are not lost.

Quoted value with a comma

name,tags on the first line, then Asha,"admin, editor"

[ { "name": "Asha", "tags": "admin, editor" } ]

Quoted values can contain separators, so the comma inside the tags stays part of one value.

About CSV to JSON Converter

A CSV to JSON converter turns rows of a table into structured data that programs can read. Paste CSV text, or cells copied from a spreadsheet, and each row becomes an object with the column headings as keys. The separator is detected automatically, so commas, semicolons, tabs and pipes all work.

Quoted values can contain separators, quotation marks and line breaks, and blank lines are skipped. You can choose whether the first row is a header and whether numbers and true or false values should be converted. Numbers such as 007 or 1.50 are left as text so no digits are lost, and duplicate headings are made unique.

How to use CSV to JSON Converter

  1. Paste your CSV text or copied spreadsheet cells.
  2. Check the separator, or leave it on automatic detection.
  3. Choose whether the first row is a header and whether to convert numbers.
  4. Copy the JSON or download it as a file.

Common uses

  • Preparing spreadsheet data for a website or program
  • Turning an exported report into structured records
  • Converting a small list for use in a test or example
  • Checking how a CSV file is being read

Frequently asked questions

How do I convert CSV to JSON?

Paste your CSV into the input box. The JSON appears immediately as an array of objects, with the first row used for the keys. Copy it, or download it as a file. If the first row is data rather than headings, turn off the header option.

Does it detect the separator automatically?

Yes. By default the first line is inspected and the most common of comma, semicolon, tab and pipe is used. If the guess is wrong, such as when text contains many commas, choose the separator yourself from the list.

How are quotes and line breaks handled?

A value wrapped in double quotes can contain separators and line breaks, and a doubled quotation mark inside it stands for one quotation mark. If a quote is opened but never closed, the tool reports it so you can find and fix the problem.

Why are some numbers kept as text?

Numbers are converted only when turning them back into text would give the same digits. A value like 007 or 1.50 would lose zeros if converted, so it stays as text. This keeps identifiers, postcodes and prices exactly as they were typed.

What if a row has too few or too many values?

A short row is padded with empty text for the missing fields. A row that is longer than the header gets extra fields named column_ followed by a number, so no data is dropped. Check the source file if many rows differ in length.

Guides