Free CSV to JSON Converter

Paste CSV or open a .csv file and click Convert to JSON: the delimiter is detected for you, the header row becomes the object keys, and numbers and true/false become real JSON values. Copy the result or download a .json file. Everything runs in your browser, so your data never leaves your device.

100% Private & Secure: All CSV to JSON conversion happens in your browser. Your data never leaves your device and is never sent to any server.

Options
0 characters

๐Ÿ’ก Tip: The delimiter is auto-detected. Quoted values, escaped quotes ("") and line breaks inside quotes are handled. No size limit: everything runs on your device.

Features

  • โ€ข Auto-detect delimiter (comma, semicolon, tab, pipe)
  • โ€ข Array of objects or array of arrays
  • โ€ข Quoted values, escaped quotes and multi-line cells
  • โ€ข Numbers and true/false detected; long IDs kept exact
  • โ€ข Duplicate or empty headers renamed, never lost
  • โ€ข Open a file or convert several files into one ZIP
  • โ€ข No file size limit
  • โ€ข Copy & download output

How to convert CSV to JSON online, free and without uploading

To convert CSV to JSON, paste your data into the CSV Input box, or click Open CSV File, and click Convert to JSON. With First row as headers ticked, every row becomes a JSON object whose keys are the column names, and plain numbers and true/false become real JSON values. The delimiter is detected for you. Click Copy, or Download JSON, which saves converted.json or, for an opened file, the same name with .json. Open CSV File and Load Sample convert straight away.

It runs in your browser; nothing is uploaded (you can check the Network tab in DevTools). That includes the files you open, which are read on your device. The tool sets no file size limit of its own, so a very large file simply takes longer and uses more of your deviceโ€™s memory.

Numbers are converted only when the value survives the trip. A zip code such as 007, a long ID and -0 stay text, while 3.50 becomes 3.5 because the cell is read as a number and written back without the trailing zero. Untick Detect numbers and true/false if you want every value kept exactly as a string. Dates are never converted and stay text.

To go the other way, use the JSON to CSV converter. Check the result with the JSON validator and tidy it with the JSON formatter.

Table of Use: which setting for which CSV

Common CSV situations, the setting to use and the JSON you get
Your CSVSettingJSON you get
A header row, then dataFirst row as headers (on by default)An array of objects, such as {"Name": "John Doe", "Age": 30}
No header rowUntick First row as headersObjects keyed column1, column2 and so on
Rows that should be plain listsOutput Format: Array of Arrays["John Doe", 30] per row; the header row stays first as text
Semicolons, as in many European spreadsheet exportsAuto-detect, or Delimiter: Semicolon (;)The same structure; the detected separator is shown above the output
Tab-separated (TSV) or pipe-separated dataAuto-detect, or Delimiter: Tab or PipeOne field per column
A quoted cell such as "Los Angeles, CA"Nothing to setOne value, "Los Angeles, CA", comma included
Empty cellsTick Empty cells as nullnull instead of an empty string
Spaces around valuesTrim spaces around values (on by default)" x " becomes "x"; untick it to keep the spaces
A payload for an API or a config fileJSON Style: MinifiedOne line with no spaces; the other styles indent with 2 or 4 spaces

Need another format? The JSON to XML converter and the JSON to YAML converter take the output from here.

Features

  • Delimiter detection. Auto-detect chooses between comma, semicolon, tab and pipe, or you can pick one under Delimiter. The detected separator is named above the output.
  • Standard quoting. Quoted values can hold the delimiter, line breaks and doubled quotes, and a quote in the middle of a value, such as a 12" ruler, is kept as text.
  • Two output shapes and three styles. Array of Objects or Array of Arrays, printed with 2 spaces, 4 spaces or minified.
  • Four options. First row as headers, Detect numbers and true/false, Empty cells as null and Trim spaces around values. Changing one re-converts the current result and any batch.
  • Safe numbers. Leading zeros, integers beyond 9,007,199,254,740,991 and decimals with more than 15 significant digits stay text, so nothing is silently rounded.
  • Headers never lost. Empty or repeated header names are renamed (column3, name_2) and a warning tells you how many.
  • Warnings. Blank lines skipped, rows with different field counts and parser errors are listed above the output.
  • Statistics. Rows, Columns and Output Size in KB, with a summary line of rows by columns above the output.
  • Files and batches. Open CSV File takes one .csv, .tsv or .txt file. Convert Several Files converts many and Download All (ZIP) saves csv-to-json.zip.

Data arriving in another format? The XML to JSON converter and the YAML to JSON converter cover those sources.

How to use the CSV to JSON converter

  1. Paste your CSV into CSV Input, or click Open CSV File to choose a .csv, .tsv or .txt file, or click Load Sample to see an example.
  2. Leave Delimiter on Auto-detect, or choose Comma, Semicolon, Tab or Pipe.
  3. Pick Output Format (Array of Objects or Array of Arrays) and JSON Style (Pretty with 2 or 4 spaces, or Minified).
  4. Tick or untick First row as headers, Detect numbers and true/false, Empty cells as null and Trim spaces around values.
  5. Click Convert to JSON if you pasted text. Read any warnings above JSON Output.
  6. Click Copy, or Download JSON. For many files, click Convert Several Files and then Download All (ZIP).

Who can use it

  • Developers turning a spreadsheet export into a fixture or seed file for an API, then checking it with the JSON minifier for the smallest payload.
  • Analysts who need JSON for a script or a database import, and want leading zeros and long IDs left intact.
  • Site owners moving a product or contact list from a spreadsheet into a JSON-driven page.
  • Students learning how rows and columns map to objects and arrays, by changing one option at a time.
  • Support and operations teams reshaping an export before a handover, and comparing two exports afterwards.

FAQs

How do I convert a CSV file to JSON?

Paste your CSV into the CSV Input box, or click Open CSV File, which converts straight away. Otherwise click Convert to JSON. With First row as headers ticked, each row becomes a JSON object whose keys are the column names. Click Copy, or Download JSON to save the result. Once a result exists, changing any option updates it automatically.

Which delimiters and CSV quirks does it handle?

Comma, semicolon, tab and pipe separated data, detected automatically or chosen under Delimiter. Quoted values may contain the delimiter, line breaks and doubled quotes. Windows, Unix and old Mac line endings all work, and the byte order mark that Excel adds to UTF-8 files is removed, so it does not end up in the first column name. Blank lines are skipped and counted in a warning.

How are numbers and true/false converted?

With Detect numbers and true/false ticked, plain numbers such as 42, -3.5 or 1e3 become JSON numbers, and true or false in any letter case becomes a boolean. Values that would be altered stay text: 007, integers beyond 9,007,199,254,740,991, decimals with over 15 significant digits and -0. Note that 3.50 becomes 3.5. Untick the option to keep every value as a string.

How are empty cells, short rows and duplicate headers handled?

Empty cells become empty strings, or null if you tick Empty cells as null. A row shorter than the widest row gets its missing keys filled the same way, and a warning says so. Empty header names become column1, column2 and so on, and repeated names get a suffix, as in name and name_2, so no column overwrites another.

Can I convert CSV without a header row?

Yes. Untick First row as headers and every row, including the first, becomes data, with the generic keys column1, column2 and so on. If you would rather have no keys at all, set Output Format to Array of Arrays and each row comes out as a plain list of values in the same order as the file.

Should I choose Array of Objects or Array of Arrays?

Choose Array of Objects when other code reads the data by field name, as most APIs and front-end apps do; it repeats the column names in every record. Choose Array of Arrays for the smallest output or when column order matters more than names. With headers ticked, the arrays version keeps the header row as the first array, as text.

Can I convert several CSV files at once?

Yes. Click Convert Several Files and select your .csv, .tsv or .txt files. Each one is converted with the current settings, and the list shows its row count or says it failed. Download All (ZIP) saves csv-to-json.zip with one .json file per source. A repeated name gets -2 before the extension, and changing an option converts the whole batch again.

Is my CSV data uploaded anywhere?

It runs in your browser; nothing is uploaded (you can check the Network tab in DevTools). Pasted text and opened files are read and converted on your device. The only requests you may see are this siteโ€™s own scripts, such as the CSV parser loaded on your first conversion, and none carries your data. There is no account, and nothing is stored after you close the page.