Skip to content
DoItJag

CSV to JSON

Turn CSV data from spreadsheets and exports into JSON. Comma, semicolon, tab and pipe delimiters are detected automatically.

or drop a file here · .csv, .tsv, .txt · up to 50 MB

About CSV to JSON

CSV to JSON reads comma-separated (or semicolon, tab or pipe separated) data and turns it into JSON. With a header row, each data row becomes an object whose keys are the column names. Without one, each row becomes a plain array. Quoted cells, doubled quotes and line breaks inside cells are handled, and the delimiter can be detected for you.

It suits developers feeding spreadsheet exports into an app or API, and anyone whose tool only accepts JSON.

When to use it

  • A spreadsheet exported with semicolons, as many European locale settings do, needs to become JSON.
  • You want seed data or a test fixture from a list kept in a spreadsheet.
  • A web form or API expects an array of objects, but your data lives in a CSV report.

Worked example

Paste these four semicolon-separated lines:

  • id;name;city;active;zip
  • 1;"Smith, Jane";Pune;true;00412
  • 2;Ravi;Delhi;false;
  • 3;Ana;Lisbon;TRUE;1100

With the default options, the note reads “3 rows × 5 columns (delimiter: Semicolon (;))”. The first object is {"id": 1, "name": "Smith, Jane", "city": "Pune", "active": true, "zip": "00412"}. The quotes protect the comma in the name, and the zip keeps its leading zero. Ravi’s empty zip becomes null, and Ana’s TRUE stays the text "TRUE", while her zip 1100 becomes a number.

Good to know

  • With type conversion on, only lowercase true and false become booleans, empty cells become null, and numbers such as 19.90 or 1e3 become 19.9 and 1000. Leading zeros and whole numbers too long to store exactly stay as text.
  • Repeated column names get a suffix (a, a_2), and blank headers become column1, column2 and so on.
  • Cells beyond the number of header columns are dropped, and missing cells are filled in as empty (null with type conversion on).
  • Automatic detection compares the first 10 non-empty lines. If it guesses wrong, choose the delimiter yourself.
  • You can open a file of up to 50 MB, and parsing stops above 1,000,000 rows.
  • To go the other way, use JSON to CSV.

How to use CSV to JSON

  1. Paste CSV or open a .csv file.
  2. Check the delimiter and header options.
  3. Select Convert to JSON, then copy or download.

Privacy: how it works

Your data is converted in your browser and never uploaded.

Frequently asked questions

Will numbers like 007 or long IDs be changed?

No. Values with leading zeros, and whole numbers too large to store exactly, stay as text so nothing is lost.

Does it handle commas and line breaks inside cells?

Yes. Quoted cells are parsed according to RFC 4180, including doubled quotes and line breaks.