Skip to content

CSV to JSON Converter

Turn CSV or TSV data into JSON without uploading it. The parser follows RFC 4180, so quoted fields, escaped quotes and line breaks inside cells are handled correctly, the delimiter is detected automatically, and you can choose objects keyed by the header row or plain arrays, pretty or minified.

Runs in your browserFreeNo sign-up

Processed on your device. Files and text stay in your browser and are not uploaded to our servers. How privacy works

How to use the csv to json converter

  1. Paste CSV text, cells copied from a spreadsheet, or open a .csv or .tsv file from your device.
  2. Check the detected delimiter, or pick comma, semicolon, tab or pipe explicitly if the guess is wrong.
  3. Choose Array of objects (uses the first row as keys) or Array of arrays, and whether to trim cells, convert numbers and booleans, or turn empty cells into null.
  4. Copy the JSON or download it as a .json file.

Features

  • RFC 4180 parsing: quoted fields, doubled quotes, embedded commas and multi-line cells
  • Automatic detection of comma, semicolon, tab and pipe delimiters
  • Objects or arrays, pretty-printed or minified output
  • Optional type inference for numbers and true/false, trimming, and empty-to-null
  • Duplicate or blank headers are made unique so no data is lost
  • Row and column counts, output size and a warning for unclosed quotes

How the conversion works

The text is read character by character. Outside quotes, the delimiter ends a field and a line break ends a row; inside a quoted field everything is literal, and a doubled quote ("") stands for one quote character. The first row optionally becomes the key list; every subsequent row becomes an object with those keys, so JSON consumers always find the same properties on every record.

Cells are strings by default. With type inference on, values that look like numbers (42, -3.5, 1e6) become JSON numbers and true/false become booleans, but values with leading zeros such as 007 or more than 15 significant digits stay strings so IDs and phone numbers aren't mangled.

Delimiter detection

The first 25 non-empty lines are scanned and the candidate delimiter that appears a consistent number of times per line wins. European spreadsheets often export with semicolons because the comma is the decimal separator; tab-separated exports are common from databases. If your data has only one column, detection can't tell, so pick the delimiter manually.

Limits and privacy

Files up to 10 MB can be opened and inputs up to about 3 million characters are converted live; larger inputs should be split. Parsing happens in your browser, which makes the tool suitable for exports that contain personal data.

Frequently asked questions

Why did a column shift or merge in the output?

Usually the delimiter was misdetected, or a field contains the delimiter without quotes around it. Set the delimiter explicitly, and quote fields that contain commas in the source.

What happens to duplicate column names?

The second occurrence becomes name_2, the third name_3 and so on, and blank headers become column1, column2. That way every value keeps its own key.

Can I convert a file with Windows line endings or a trailing newline?

Yes. CRLF, LF and CR line endings are all accepted and a trailing newline doesn't create an empty record.

How do I go the other way, from JSON to CSV?

Use the JSON to CSV converter on this site, which flattens arrays of objects into rows with a header line.

Other tools people use alongside CSV to JSON Converter.

You might also like

Something useful from another corner of VoltKit.