Paste CSV. Get clean JSON. Nothing ever uploads.

A CSV to JSON converter that handles quoted fields, commas inside values and messy exports — with exact line-and-column errors when something is wrong.

  • Runs entirely in your browser
  • Delimiter auto-detection
  • Exact error positions
  • Free, no sign-up, no limits

Convert CSV to JSON

paste, type, or drop a .csv file

updates as you type

Paste CSV or drop a .csv file to begin.

Conversion settings

Auto-detect reads the first rows and picks the delimiter with the most consistent column count. Quoted delimiters inside values are never mistaken for separators.

Output format

Objects use the header row as keys. Arrays keep every row, including the header, as a plain 2D grid.

Indentation

Privacy you can verify, not just trust

Most online converters upload your file to a server first — and some keep it. This one can't: the parser is JavaScript running entirely in your browser. Your CSV is never sent anywhere — the only requests to other sites are the site's own analytics, which count page views — and nothing you paste is saved: reload the page and it is gone. Don't take our word for it:

External requests during processing: 0
  1. Press F12 to open developer tools, then the Network tab.
  2. Paste CSV and convert above. Watch: apart from the site's analytics, nothing is requested — no uploads, and no data ever leaves your device.
  3. Extra credit: disconnect your internet after this page loads — conversion still works.

How to convert CSV to JSON without breaking your data

CSV looks simple — values separated by commas, one record per line — until real-world data shows up. A city written as New York, NY, a note containing a line break, a quote inside a quoted field: each of these breaks naive converters that split on every comma and every newline. This tool parses CSV the way the format actually defines it (RFC 4180), so messy exports come out as clean, valid JSON instead of silently shifted columns.

The quoting rules, in plain English

There are only three rules, and everything else follows from them. First, a field that contains the delimiter, a double quote, or a line break must be wrapped in double quotes: "New York, NY". Second, a double quote inside a quoted field is written twice: "Manchester, ""UK""" means the value Manchester, "UK". Third, a quoted field may span several lines — the line break inside the quotes is part of the value, not the end of the record. An unquoted field ends at the next delimiter or line break, and a quote that appears in the middle of an unquoted field is an error, not something to guess around.

A worked example with messy CSV

Press "Load messy example" above and you get this file — four rows that break most quick-and-dirty converters:

name,city,zip,score,active,user.role
Ada Lovelace,London,02134,92.5,true,admin
"Grace Hopper","New York, NY",10001,88,false,editor
Alan Turing,"Manchester, ""UK""",M13 9PL,97.25,true,viewer

Grace's city holds a comma, so it is quoted; Alan's city holds both a comma and quotes, so it is quoted and the inner quotes are doubled. With "Detect numbers and booleans" on, the output types 92.5 as a number and true as a boolean — but 02134 stays the string "02134", because turning it into a number would silently delete the leading zero and corrupt the ZIP code. With "Nest dotted headers" on, user.role becomes {"user": {"role": "admin"}}.

Headers: what becomes a key

By default the first row supplies the JSON keys, one per column, and every later row becomes an object. Headers are trimmed of surrounding spaces, and an empty header becomes column_3 (or whichever position it holds) so no value is ever lost. Duplicate headers — two columns both called price — are kept distinct as price and price_2 instead of one silently overwriting the other. If your file has no header row, untick "First row is a header": the keys become column_1, column_2 and so on, or switch to "Array of arrays" for a plain 2D grid with no keys at all.

Nested output from dotted headers

APIs often expect nested objects, but spreadsheets are flat — so exports flatten nesting into dotted column names like user.name and address.city.zip. Tick "Nest dotted headers" and each dot splits one level deeper: address.city.zip becomes {"address": {"city": {"zip": "02134"}}}. Leave it off and the headers are kept exactly as written, which is what you want when the receiving API expects flat dotted keys. Note that nesting only applies to keys containing a dot; every other key is untouched.

Delimiters: not every CSV uses commas

European spreadsheet exports commonly use semicolons, because the comma is the decimal separator there. Tab-separated files come from database dumps, and pipe-separated files from logs. Auto-detect scores each candidate delimiter against the first rows and picks the one with the most consistent column count — and because detection respects quotes, a semicolon inside a quoted value never fools it. If the guess is wrong, pick the delimiter yourself from the dropdown; the preview updates instantly.

Large files and line endings

There is no file-size cap and no monthly limit: parsing happens in your own tab, so a 50,000-row export converts in well under a second on a modern machine. Windows (CRLF), Unix (LF) and old Mac (CR) line endings are all accepted, as is a UTF-8 byte-order mark at the start of the file — Excel's "CSV UTF-8" export adds one, and many converters choke on it. Blank lines are skipped silently. Very large files (hundreds of thousands of rows) still work, but the live preview re-parses on every keystroke, so for a huge paste it is faster to upload the file and let it convert once.

Mistakes this tool catches — and what to do about them

Unterminated quote

A field opens with " and never closes it, so the parser swallows the rest of the file as one value. The error points at the opening quote — add the missing closing quote there.

Stray quote mid-field

A quote in the middle of an unquoted value, like ab"cd, is illegal CSV. Quote the whole field and double the inner quote: "ab""cd".

Wrong field count

A row with more or fewer fields than the header usually means an unquoted comma in a value, or a missing delimiter. The error names the exact line so you can count its fields.

Characters after a closing quote

After a quoted field closes, only a delimiter or a line break may follow. "ok"x is malformed — the stray character sits at the reported column.

Leading zeros lost

Turning 02134 into a number deletes the zero. Typing here is opt-in and conservative: leading-zero values and unsafe integers always stay strings.

Semicolon files read as one column

If every row becomes a single key, your file is semicolon- or tab-separated. Pick the delimiter from the dropdown — or leave it on auto-detect, which usually gets it right.

Frequently asked questions

How do I convert a CSV file to JSON without uploading it anywhere?

Use a converter that runs entirely in your browser. Paste your CSV or drop a .csv file into the converter above: the parser is JavaScript running on your own device, so the data is never sent to any server. The JSON preview updates as you type, and you can copy it or download it as a .json file. You can verify this in your browser's Network tab — apart from the site's own analytics, nothing is requested while you convert.

Why does my CSV break when a value contains a comma?

A bare comma always means 'next column' in CSV, so a value that contains a comma must be wrapped in double quotes — for example, "New York, NY". A quote inside a quoted value is written as two quotes: "Manchester, ""UK""". This converter follows those RFC 4180 rules exactly: quoted fields may contain commas, line breaks and escaped quotes, and only a lone double quote ends a quoted field.

What does an error like 'line 3, column 12' mean?

It is the exact position of the problem in your CSV. Line 3 means the third row of the file (counting the header as line 1), and column 12 means the twelfth character on that line. An unterminated quoted field points at the opening quote that was never closed; a stray quote points at the quote itself; a row with the wrong number of fields points at the start of that row. Open the file in a text editor, go to that line and column, and the fault is right there.

How do I turn dotted headers like user.name into nested JSON objects?

Tick 'Nest dotted headers' in the output settings. A header such as user.name then becomes a nested object — {"user": {"name": "Ada"}} — instead of a flat key called "user.name". Dots split the path at every level, so address.city.zip becomes three levels deep. Turn the option off and the headers are kept exactly as written, which is what you want when the receiving API expects flat dotted keys.

Will my ZIP codes lose their leading zeros?

Not with this converter. By default every value stays a string, so 02134 stays "02134". If you turn on 'Detect numbers and booleans', typing is deliberately conservative: a value only becomes a number when it round-trips exactly, so 02134 and 007 stay strings, integers beyond JavaScript's safe range stay strings, and only clean numbers like 42 or 3.14 become JSON numbers. True and false become booleans, and empty cells become null.