CSV to JSON converter

Paste CSV from Excel, Google Sheets or a database export and get a JSON array of objects. The separator is detected automatically.

Separator

How it works

  1. Paste your code

    Paste the code in the left box or open a file. No code to hand? Click Example.

  2. Instant result

    The result appears as you type. If there is an error, you see the line and character.

  3. Copy or download

    Copy the result with one click or save it as a file for your editor or project.

How does CSV become JSON?

Every row becomes an object and the first row supplies the keys. Values in quotes may contain the separator, quotes (written as "") and even line breaks. Turn off First row contains column names to get an array of arrays instead.

Numbers and true/false

With Recognise numbers and true/false, 34 becomes a number and true a boolean. Values with a leading zero, such as the postcode 0123, stay text so the zero isn't lost. Empty cells become null. Decimal commas (41,5) are read as numbers too.

Comma, semicolon or tab?

European versions of Excel often save CSV with a semicolon, because the comma is used for decimals there. Automatic looks at the first line and picks the separator that makes sense. Going the other way? Use JSON to CSV.

Frequently asked questions

Is the CSV to JSON free?

Yes. The CSV to JSON is completely free, with no account, sign-up or usage limit.

Is my code stored?

No. Your code is processed in your browser and is not sent to a server or stored.

Does it work on my phone?

Yes. The tool works in any modern browser on a phone, tablet or computer.