CSV to JSON

Paste CSV or drop a file and get clean JSON - quoted fields, embedded commas and escaped quotes all parsed correctly.

Drop a .csv file or click to choose
Read locally in your browser

A CSV parser that actually parses

Splitting a CSV line on commas works right up until a value contains a comma - then everything shifts and your data is quietly corrupted. This converter reads CSV the correct way, with a small state machine that understands quoted fields. A field wrapped in double quotes can hold commas, line breaks and escaped quotes (two double quotes in a row), and all of it lands in the right place.

Delimiter, headers and types

By default the delimiter is auto-detected by counting commas, semicolons and tabs in the first line, so European semicolon files and tab-separated exports just work; override it in the dropdown if needed. The first row is taken as the column names unless you say otherwise, in which case columns become col1, col2 and so on. Type inference turns 42 into a number, true into a boolean and an empty cell into null - handy for feeding real JSON to an API, but switch it off when you have codes like 007 that must stay strings.

From a file or the clipboard

Paste directly, or drop a .csv straight from your downloads folder - it is read locally and never uploaded. The output is pretty-printed JSON you can copy or download, ready to drop into code, a config file or a test fixture.

Going the other direction? Use the JSON to CSV converter. To tidy the result, pretty-print it with the JSON formatter, and if you are loading it into a database, the SQL formatter keeps your insert statements readable.

Frequently asked questions

Does it handle commas inside quoted fields?
Yes. It uses a proper CSV parser, not a naive split on commas. A field wrapped in double quotes can contain commas, line breaks and escaped double quotes (written as two double quotes in a row), and they are all parsed correctly.
How does the delimiter auto-detection work?
It counts commas, semicolons and tabs in the first line, ignoring anything inside quotes, and picks the most frequent. You can override this with the delimiter dropdown if your data is unusual.
What is type inference?
With it on, values that look like numbers become JSON numbers, true and false become booleans, and empty cells become null. Turn it off to keep every value as a string, which is safer for things like ID codes with leading zeros.
What if my file has no header row?
Untick "First row is header" and the columns are named col1, col2, col3 and so on, with every row treated as data.
Is anything uploaded?
No. Parsing happens entirely in your browser. Dropping a .csv file reads it locally with the File API - nothing is sent anywhere.