Boneyard Tools

CSV to JSON Converter

CSV to JSON converts spreadsheet rows into a JSON array you can drop into an app, a config file or an API request. Keep the header row to get named objects, or turn it off for plain arrays, and let numbers and booleans type themselves automatically. It is built for developers, analysts and anyone moving data out of Excel or Google Sheets.

How to convert CSV to JSON

  1. Paste your CSV, including the header row if you have one, into the input box.
  2. Leave 'First row is a header' checked to build objects, or uncheck it to get arrays.
  3. Leave 'Convert numbers and booleans' checked so 36 and true stop being strings.
  4. Click 'Convert to JSON' to run the conversion.
  5. Copy the JSON or download it as a .json file.

Examples

With a header row (objects)

name,age
Ada,36
Linus,54
[
  {
    "name": "Ada",
    "age": 36
  },
  {
    "name": "Linus",
    "age": 54
  }
]

Automatic typing of numbers and booleans

city,pop,capital
Paris,2100000,true
[
  {
    "city": "Paris",
    "pop": 2100000,
    "capital": true
  }
]

No header row (arrays)

Ada,36
Linus,54
[
  [
    "Ada",
    36
  ],
  [
    "Linus",
    54
  ]
]

Frequently asked questions

Does the first row become the keys?

If you keep 'First row is a header' checked, yes. Each column header becomes an object key and every following row becomes one object. Uncheck it and each row becomes an array of values in column order instead.

Are numbers kept as numbers?

With 'Convert numbers and booleans' on, a value like 42 becomes the number 42 and true or false becomes a real boolean rather than a quoted string. Turn it off to keep every field as text, which is safer for things like zip codes and phone numbers that have leading zeros.

Does it handle quoted commas?

Yes. Standard CSV quoting is respected, so a value such as "Doe, John" stays in a single field and the comma inside it is not treated as a separator.

Which delimiters are supported?

The parser auto-detects the delimiter, so comma, semicolon, tab and pipe separated files all work without a setting. It inspects the first rows and picks the character that produces a consistent column count.

How are empty cells handled?

With automatic typing on, an empty cell becomes null. Turn typing off and it stays as an empty string. Either way the surrounding columns keep their positions.

Does it skip blank lines?

Yes. Fully empty lines are skipped, so a trailing newline at the end of the file does not add an empty object or array to the output.

Why did I get an error?

The converter only rejects broken quoting, such as a field that opens a quote and never closes it. Ragged rows with too few or too many columns are tolerated. Fix the unbalanced quote and convert again.

Does my data leave the browser?

This converter runs on our servers so it can meter free usage and power the API. Your CSV is sent over an encrypted connection, converted and returned; it is not stored after the response.

Is there an API?

Yes. Every conversion is available as a JSON API with a free tier and pay as you go pricing for higher volume, so you can wire CSV to JSON directly into a script or pipeline.

Learn more

Related tools