Skip to content
SPCXTools

CSV to JSON Converter

Turn CSV and TSV data into clean JSON with automatic delimiter detection and type conversion.

Runs locally — files never leave your device

Loading tool…

How to use CSV to JSON Converter

  1. 1Paste your CSV into the left box, or press Open file to load a .csv, .tsv or .txt file.
  2. 2Check the delimiter (Auto-detect works for most files) and whether the first row contains headers.
  3. 3Choose whether to convert numbers and booleans, and pick pretty or minified output.
  4. 4Copy the JSON or download it as a .json file.

Convert CSV to JSON in your browser

CSV is the universal export format of spreadsheets, databases and analytics tools, while JSON is what APIs, JavaScript apps and NoSQL databases expect. This CSV to JSON converter bridges the two: paste or open a CSV file and get well-formed JSON instantly. It detects the delimiter automatically, handles quoted fields correctly and converts numbers, booleans and empty cells into proper JSON types. Your data never leaves your device.

Features

  • Array of objects or array of arrays — use the header row as keys, or keep rows as plain arrays.
  • Delimiter auto-detection for comma, semicolon, tab (TSV) and pipe, with manual override.
  • Standards-compliant parsing of quoted fields, embedded commas, line breaks and escaped quotes.
  • Type conversion — numbers, true/false and null, while keeping leading-zero values like ZIP codes as text.
  • Duplicate and blank headers are renamed automatically (name_2, column_3) so no data is overwritten.
  • Pretty or minified output, one-click copy and .json download.
  • Private — files are read locally and never uploaded.

Example

This CSV:

id,name,active
1,Ada Lovelace,true
2,"Turing, Alan",false

becomes:

[
  { "id": 1, "name": "Ada Lovelace", "active": true },
  { "id": 2, "name": "Turing, Alan", "active": false }
]

The quotes around "Turing, Alan" keep the comma inside the field instead of splitting it into two columns.

Tips for clean conversions

  • Make sure the first row contains the column names you want as JSON keys. Short, consistent names without spaces (for example first_name) are easiest to use in code.
  • Check the row and column count shown under the editor. If the number of columns looks wrong, the delimiter is probably wrong too.
  • Watch for numbers formatted as text. Values such as 1,234.50 or 12% stay as strings because they aren't valid JSON numbers. Clean them in your spreadsheet first if you need numbers.
  • Large files of several megabytes convert fine, but very large exports may be slow to display. Download the result instead of scrolling through it.

Related tools

Need to go the other way? The JSON to CSV Converter turns JSON arrays into spreadsheet-ready CSV. To validate or reformat the result, paste it into the JSON Formatter.

Frequently asked questions

What JSON structure does the converter produce?
With First row is a header ticked, you get an array of objects, one per row, using the header cells as keys: [{"id": 1, "name": "Ada"}, …]. Without it, you get an array of arrays, one per row: [[1, "Ada"], …].
How are numbers, booleans and empty cells converted?
With Convert numbers and booleans ticked, values like 42 and 3.14 become JSON numbers, true and false become booleans, and empty cells become null. Values that would lose information stay as text — for example ZIP codes or IDs with leading zeros (00123) and very large integers. Untick the option to keep every value as a string.
Does it handle commas and line breaks inside fields?
Yes. The parser follows the CSV standard (RFC 4180): fields wrapped in double quotes may contain the delimiter, line breaks and escaped quotes written as two double quotes (""). If a quote is never closed, the converter shows an error instead of guessing.
My CSV uses semicolons. Will it work?
Yes. Spreadsheet programs in many European countries export CSV with semicolons because the comma is used as a decimal separator. Auto-detect recognises commas, semicolons, tabs and pipes, or you can choose the delimiter yourself.
Is my data uploaded anywhere?
No. The file is read and converted entirely in your browser, so it's safe to use with customer lists, exports and other private data.
How do I convert an Excel file?
In Excel, Google Sheets or Numbers, export or save the sheet as CSV (comma-separated values), then open that file here.