UtilDojo

Popular

Menu

CSV to JSON Converter Online

  • This tool runs entirely in your browser. Nothing you enter or upload is sent to a server.

CSV

Tab indents · Shift+Tab outdents · Esc then Tab moves on

JSON

Your JSON shows up here

Paste or type on the left, upload a file, or drop one onto the input.

Waiting for input

JSON & data

About this tool

Paste CSV or tab-separated data and get a JSON array. With the header option on, the first row supplies the keys and each remaining row becomes an object; turn it off to get an array of arrays instead.

The parser follows the CSV standard, so quoted cells containing commas, quotes or even line breaks come through correctly. Choose comma, semicolon, tab or pipe as the delimiter. Given a header row of name, age, city, active and a line like Raj Malhotra,28,"Delhi, NCR",false, you get an object with "age": 28, "city": "Delhi, NCR" and "active": false.

Numbers, true, false and null can be converted to real JSON types, while codes with leading zeros such as 012345 are kept as text. Watch out for identifiers that have no leading zero: a PIN code such as 110001 or a phone number is turned into a number, so untick “Detect numbers and booleans” if you need every cell as a string. Nothing is uploaded — it all runs in your browser.

Edge cases: blank trailing lines are ignored; an empty header cell is named column1, column2 and so on by position; two columns with the same header collide, and the later one wins, so rename duplicates first. A quoted cell that is never closed gives an error telling you to check for the missing quote. If the result is a single long line, use the JSON Formatter to inspect it, or the JSON Validator to check it.

Frequently asked questions

Can it read a file exported from Excel?

Yes. Save the sheet as CSV (or copy the cells, which paste as tab-separated text), paste it in and pick the matching delimiter. A leading byte-order mark is ignored.

Why are some of my numbers still strings?

Values with leading zeros, such as PIN codes and phone numbers, are deliberately kept as text so they are not altered. Turn off "Detect numbers and booleans" to keep every cell as text.

What if my rows have different numbers of columns?

Missing cells become empty strings, and any extra cells beyond the header are ignored when a header row is used.

How do I keep a comma inside a value?

Wrap the cell in double quotes, as in "Delhi, NCR", and write a quote inside a cell as two quotes (""). Spreadsheet exports do this automatically.

Does it upload my file?

No. The text you paste is parsed in your browser and the result can be downloaded as data.json.

Related tools