CSV to JSON

Convert CSV files or pasted spreadsheet data to JSON, with quotes, separators and numbers handled properly.

Runs in your browser. Files never leave your device.

3 rows · 4 columns · separator: comma

Your CSV is converted on this device and never uploaded.

About the CSV to JSON

Turn a CSV file or a table copied from Excel or Google Sheets into JSON: an array of objects named after the header row, or an array of arrays if there is no header.

Paste the CSV or open the file, and the JSON appears as you type, ready to copy or download as a .json file.

How it works

The CSV is read the way spreadsheets write it: a value in double quotes can contain commas, line breaks and quotes written twice (""), and lines may end in Windows, Mac or Unix style. The separator is detected from the first lines, so semicolon files from European versions of Excel and tab-separated files work without changing anything.

Values that are plainly numbers become JSON numbers and true or false become JSON booleans. Anything that would change if turned into a number stays as text: postcodes and IDs with leading zeros, phone numbers with a plus sign, amounts written with thousands commas, and whole numbers too long to store exactly.

If a row has fewer cells than the header, the missing ones are filled in; if it has more, the extras are kept under column_4, column_5 and so on. The page tells you how many rows were uneven, so nothing goes missing without you knowing.

Assumptions and limits

  • Each header name becomes a key. Blank names become column_1, column_2…, and a repeated name gets _2, _3 added so every key is unique.
  • Spaces around values are kept unless you tick 'Remove spaces around values', because in CSV they are part of the value.
  • Blank lines are skipped. Files up to 20 MB can be opened.

Worked examples

A contact list

name,city Ayesha Khan,Lahore becomes [{"name": "Ayesha Khan", "city": "Lahore"}].

Prices from European Excel

A file like product;price with lines such as Tea;1,50 is detected as semicolon-separated. 1,50 stays the text "1,50" because JSON numbers use a dot.

Order IDs

An ID column with 00042 keeps the leading zeros as "00042" instead of turning it into the number 42.

How to use the CSV to JSON

  1. Paste or open the CSV. From a file, Excel, Google Sheets or any export.
  2. Check the options. Header row, number conversion, separator.
  3. Copy or download. Copy the JSON or save it as a .json file.

Frequently asked questions

How do I convert an Excel sheet to JSON?

In Excel choose File, Save As, and pick CSV UTF-8, then open that file here. You can also select the cells in Excel or Google Sheets, copy them and paste straight into the box.

Why did a number stay in quotes?

It would have changed as a JSON number. Leading zeros, a plus sign, thousands commas or a whole number longer than about 15 digits are kept as text so the value comes out exactly as it was in your file.

Can a value contain commas or line breaks?

Yes, as long as it is wrapped in double quotes, which is how Excel and Google Sheets save such values. A quote inside a quoted value has to be written twice, and the page tells you the line if one isn't.

What if my file uses semicolons or tabs?

The separator is detected automatically from the first lines of the file. If the guess is wrong for an unusual file, choose comma, semicolon, tab or pipe yourself in the Separator menu.

Is my data uploaded anywhere?

No. The file is read and converted by your browser on this device, and nothing is sent to a server, so it is safe to use with customer lists, exports and other private data.

This tool runs entirely in your browser. What you enter or upload stays on your device and is never sent to our servers.