CSV to JSON

Turn a CSV file into a JSON array, with one object per row. The first row gives the key names.

Your files stay on your device. Nothing is uploaded.

CSV to JSON

One file · up to 50 MB

Step 1: Add a CSV file

Drag and drop a CSV file here

or

CSV, TSV or TXT. Up to 50 MB.

Step 2: Options and preview

Delimiter in your file

Auto looks at the first rows to find the delimiter.

First row

With Data, the names are column_1, column_2 and so on.

Values

Detect turns 42 and true into JSON numbers and booleans. Leading zeros stay text.

Columns with dots

Rebuild turns an address.city column into an address object with a city field.

Step 3: Convert

How to convert CSV to JSON

  1. Add your CSV file

    Click Choose CSV file or drag the file into the box. The delimiter is found for you.

  2. Choose the options

    Say whether the first row holds column names, whether numbers should be detected, and whether columns such as address.city should become nested objects. The preview shows the table that will be converted.

  3. Convert and download

    Click Convert to JSON, then Download JSON.

About this tool

How values are written

With Detect numbers:

In the CSVIn the JSON
42, -7, 3.25Numbers: 42, -7, 3.25
1.501.5 (JSON numbers have no trailing zeros)
007, 03001234567Text: "007" (leading zero)
923001234567Text (12 or more digits)
true, FALSEtrue, false
Empty cell""
Anything elseText, exactly as written

With Everything as text, every value is text.

Rebuilding nested objects

With Rebuild nested objects, a column named address.city becomes {"address": {"city": ...}}, and a cell that holds JSON such as ["a","b"] becomes a real list. This reverses JSON to CSV. If two names clash, for example columns a and a.b, the later column keeps its flat name.

How keys are named

Keys come from the first row. A blank name becomes column_1, column_2 and so on, by position. A repeated name gets _2, _3. With First row: Data, every column is named this way and the first row is converted too.

How is the delimiter found?

The converter splits the first 50 rows with a comma, a semicolon, a tab and a pipe (|), and picks the one that gives the same number of columns in the most rows. Commas inside quoted values are ignored. If the first line of the file is sep=; (written by some Excel versions), that delimiter is used. You can always pick the delimiter yourself.

Privacy

This tool runs in your browser, on your own device. Your files and text are not uploaded to our server and we cannot see them. When you close or reload this tab, they are cleared, along with the results.

Frequently asked questions

Why does 1.50 become 1.5?

JSON numbers have no format, so 1.50 and 1.5 are the same number. Choose Everything as text to keep "1.50" exactly.

What if rows have different numbers of columns?

Missing values become empty text (""). Values beyond the named columns get the names column_N, where N is their position.

Are line breaks inside cells kept?

Yes. A quoted value with line breaks becomes JSON text with \n in it.

What does the JSON look like?

An array of objects, indented with 2 spaces, saved as UTF-8. Every object has the same keys, in the order of the columns.

Does it read semicolon and tab files?

Yes. Auto finds a comma, semicolon, tab or pipe. If the preview looks wrong, pick the delimiter yourself.

Is there a size limit?

Files up to 50 MB. The work happens on your device, so large files take longer on older phones.