CSV to JSON Converter

Turn CSV into JSON in your browser, with quoted fields, an auto-detected delimiter and optional number and boolean typing.

Enable JavaScript to customise; default output below.

Nothing is uploaded. The parsing happens in this tab.

auto counts each candidate in the first line, which is how a European semicolon export is caught.

More options Show
Style
Live preview data.json
[
  {
    "name": "Widget",
    "qty": 2,
    "active": true
  },
  {
    "name": "Gadget, large",
    "qty": 10,
    "active": false
  }
]

Output is valid and updates as you type.

Paste CSV, get a JSON array of objects. Quoted fields, odd delimiters and typed values are handled; nothing leaves your browser.

How to use

  1. Paste the CSV. A spreadsheet export pastes straight in, including the quoted fields it writes around anything containing a comma.
  2. Leave the delimiter on auto unless the guess is wrong. It counts commas, semicolons, tabs and pipes in the first line and picks the winner.
  3. Keep the header switch on if the first row names the columns. Off, the columns are named c1, c2 and so on.
  4. Decide about typing. On, 2 becomes a number and true becomes a boolean; a value with a leading zero stays a string.
  5. Copy the JSON, or download it. Invalid CSV is reported with the line and column where the parser gave up.

Example

name,qty,active
Widget,2,true
"Gadget, large",10,false

With typing on, that becomes:

[
  {
    "name": "Widget",
    "qty": 2,
    "active": true
  },
  {
    "name": "Gadget, large",
    "qty": 10,
    "active": false
  }
]

The comma inside "Gadget, large" stays part of the value, because the field is quoted.

Pitfalls

  • A doubled quote inside a quoted field is one literal quote, not two. "she said ""no""" is a single field.
  • Typing changes what an API receives. qty: 2 and qty: "2" are different values to a strict endpoint, so leave typing off when the consumer expects strings.
  • Leading zeros are the classic data loss. Postcodes, phone numbers and account references stay text here on purpose.
  • Duplicate header names cannot both be object keys. The second becomes name_2, which is visible in the output rather than silently overwriting the first.
  • A short row is filled with empty strings rather than shifting values into the wrong keys, so a ragged export stays aligned.
  • Excel writes a byte order mark at the start of a UTF-8 CSV. It lands in the first header name; delete it from the input if a key looks odd.
  • Very large files are parsed in one pass in this tab. A few megabytes is fine; a hundred megabytes belongs in a script.
  • Dates are left as text. There is no unambiguous way to read 03/04/2026, and guessing is worse than leaving it.

Compatibility

The parser follows RFC 4180: quoted fields, doubled quotes, CRLF or LF line endings. It runs in every browser released since 2017 with no library. Output is standard JSON, readable by anything. Nothing is uploaded, so file size is limited only by your machine.

Frequently asked questions

Does my data get uploaded?
No. The parsing happens in this tab, in JavaScript.
Can I get one object instead of an array?
Convert as usual and take the first element. A CSV is a list by definition, so the array is what matches it.
What about nested JSON?
CSV is flat, so the output is flat. Build nesting afterwards, or use a format that has it.
Why is my number still a string?
Either typing is off, or the value has something a number cannot have: a leading zero, a space, a currency symbol or a thousands separator.
How do I convert JSON back to CSV?
That is the other direction and a separate tool. Round-tripping also loses the type information, since CSV has no types.
Weekly drops

New tools, when there are new tools

One email when something worth using ships. No schedule to fill, so no filler.

Your address goes nowhere else, and one click unsubscribes.