CSV to JSON Converter

Paste CSV with a header row and get a JSON array of objects. Parsing happens in your browser, so private data stays private.

Runs in your browser — nothing you enter is uploaded

CSV to JSON Converter

All fields are required unless marked “optional”.

Tip: press Ctrl+Enter (Cmd+Enter on Mac) inside a text box to run.

Your result will appear hereStart typing and it updates instantly.

Formula

  • each CSV row → one JSON object { header₁: value₁, header₂: value₂, … }
  • Fields in double quotes may contain the delimiter and line breaks; a doubled quote ("") is a literal quote
  • With type conversion, 42 becomes the number 42, true becomes a boolean and an empty cell becomes null

The first row supplies the keys; every later row supplies the values.

Worked examples

Quoted commas and a missing value

CSV data
id,name,city,active 1,Ada Lovelace,"London, UK",true 2,Alan Turing,Wilmslow,false 3,Grace Hopper,New York,
Delimiter
Detect automatically
First row is a header
Yes
Convert numbers, true/false and empty cells
Yes
Output as
Array of objects (uses the header)
Indentation
2 spaces

Rows converted

3

Columns: 4

Delimiter: comma (detected)

[
  {
    "id": 1,
    "name": "Ada Lovelace",
    "city": "London, UK",
    "active": true
  },
  {
    "id": 2,
    "name": "Alan Turing",
    "city": "Wilmslow",
    "active": false
  },
  {
    "id": 3,
    "name": "Grace Hopper",
    "city": "New York",
    "active": null
  }
]

A semicolon-separated file, all values as text

CSV data
code;qty 007;12 010;3
Delimiter
Detect automatically
First row is a header
Yes
Convert numbers, true/false and empty cells
No
Output as
Array of objects (uses the header)
Indentation
Minified (one line)

Rows converted

2

Columns: 2

Delimiter: semicolon (detected)

[{"code":"007","qty":"12"},{"code":"010","qty":"3"}]

How it works

The converter follows the common CSV rules (RFC 4180): fields can be wrapped in double quotes, so a quoted field may contain commas, semicolons and even line breaks, and two double quotes inside a quoted field stand for one literal quote. Windows, Mac and Linux line endings are handled, a leading byte-order mark from Excel is ignored, and the delimiter can be detected automatically from the first line. That covers files exported from Excel, Google Sheets and databases, including European semicolon-separated files and tab-separated ones.

With type conversion on, numbers become JSON numbers, the words true and false become booleans and empty cells become null; values with leading zeros such as 007 and numbers too large to be represented exactly are kept as text so IDs and phone numbers are never altered. Turn it off to keep every value as a string. Rows with more or fewer fields than the header are reported, empty or repeated header names are made unique, and you can choose an array of arrays when the file has no header.

Everything runs locally and nothing is sent anywhere. For the reverse direction use the JSON to CSV Converter, to tidy or check the result use the JSON Formatter or JSON Validator, and to compare two versions of a file use the Text Diff Checker.

Assumptions and limits

  • The first row is treated as the header unless you turn that off.
  • With type conversion off, every value is a string.
  • Input above about 2 million characters is not accepted.

Common questions

How are commas inside a field handled?
If the field is wrapped in double quotes, the commas are kept as part of the value, as in "London, UK".
Will leading zeros in IDs be lost?
No. Values such as 007 stay as text even with type conversion on, because converting them to a number would change them.
Can it read semicolon or tab separated files?
Yes. Leave the delimiter on automatic, or choose semicolon, tab or pipe.
Is my data uploaded?
No. The conversion happens in your browser and nothing is sent to a server.