CSV to JSON Converter

Paste CSV and get a JSON array with one object per row, keyed by the header. Parsing follows RFC 4180 and runs entirely in your browser.

Loading tool…

About the CSV to JSON

The converter reads CSV according to RFC 4180: a field wrapped in double quotes may contain the delimiter, line breaks and quotes written as "". So "Arlington, VA" stays one value and "Linus ""Tux"" Torvalds" becomes Linus "Tux" Torvalds. A leading UTF-8 byte order mark, which Excel adds on export, is removed.

With Auto-detect, the delimiter is picked by counting commas, semicolons, tabs and pipes outside quotes in the first ten lines and choosing the one that appears the same number of times on every line. European Excel exports use semicolons, so pick it by hand if detection guesses wrong. When First row is header is on, each row becomes an object; blank header cells are named column3 and duplicates get a suffix such as name_2. Turn it off to get an array of arrays.

Detect numbers & booleans turns 42, -3.5, true, false and null into JSON types. Values with leading zeros such as ZIP codes 02134 and numbers longer than 15 digits stay strings so they are not corrupted. Nothing is uploaded; the file never leaves your device.

How to use it

  1. Paste CSV or open a .csv file.
  2. Check the delimiter and whether the first row is a header.
  3. Choose the JSON indentation.
  4. Copy the JSON or download it as converted.json.

Frequently asked questions

How do I keep ZIP codes and IDs with leading zeros?
They are kept automatically: a value such as 02134 is not treated as a number. To keep every value as a string, turn off “Detect numbers & booleans”.
Can a CSV field contain a line break?
Yes, if the field is enclosed in double quotes. The parser keeps the line break inside the value, and it appears as \n in the JSON string.
Why is my whole row in a single key?
The delimiter was not recognised. Select it manually (comma, semicolon, tab or pipe) in the Delimiter menu.
Is there a size limit?
Only your browser's memory. Files of a few megabytes convert instantly; very large files may make the page slow while it renders the output.

Related tools