Skip to content
XUtilHub

CSV to JSON Converter – Convert CSV Files to JSON

Convert CSV or TSV data to a JSON array of objects, with automatic delimiter detection, header rows and number and boolean conversion.

  • Free, no sign-up
  • Runs in your browser, nothing uploaded
CSV
JSON

About the CSV to JSON

Turn spreadsheet exports into JSON. The first row becomes the keys, numbers and true/false values are converted automatically, and quoted fields with commas are handled correctly.

Key features

  • Header row becomes JSON keys
  • Auto-detects comma, semicolon, tab or pipe
  • Numbers and true/false converted automatically
  • Handles quoted fields with commas and line breaks
  • Array of objects or array of arrays
  • Private: data stays in your browser

Turn spreadsheet data into JSON

CSV is the universal export format for spreadsheets, databases and analytics tools. Convert it to JSON for APIs, JavaScript apps, test fixtures or NoSQL databases.

Example

id,name,active
1,Ana,true
2,"Lee, Min",false

becomes

[
  { "id": 1, "name": "Ana", "active": true },
  { "id": 2, "name": "Lee, Min", "active": false }
]

The quoted field "Lee, Min" stays one value even though it contains a comma.

Troubleshooting

ProblemFix
Everything is in one columnChoose the right delimiter (e.g. Semicolon)
Leading zeros disappear (007 → 7)Turn off number conversion
"Quoted field unterminated"A value has an opening quote without a closing one
Odd characters (é)The file isn't UTF-8; re-export it as CSV UTF-8

JSON to CSV, Excel to JSON, and JSON formatter.

How to use the CSV to JSON

  1. Paste your code into the input box, upload a file, or click Sample to try it out.
  2. Choose the options you want, such as indentation, line width or dialect.
  3. The result appears instantly in the output panel. Syntax errors are shown with their line and column.
  4. Click Copy to copy the result, or Download to save it as a file.

Frequently asked questions

How are numbers handled?

With 'Convert numbers & booleans' on, values like 42 and true become JSON numbers and booleans. Turn it off to keep every value as a string, for example to preserve leading zeros in IDs or phone numbers.

What if my CSV uses semicolons?

Leave the delimiter on Auto-detect, or choose Semicolon. Spreadsheets in many European locales export CSV with semicolons because the comma is the decimal separator.

What if my file has no header row?

Untick 'First row is header' to get an array of arrays, one per row.

Can I convert Excel files?

Save the sheet as CSV first, or use our Excel to JSON converter, which reads .xlsx files directly.

Is my code uploaded anywhere?

No. Every developer tool runs entirely in your browser, so source code, configuration files and passwords never leave your device.

Which formatter do you use?

HTML, CSS and JavaScript are formatted with Prettier, the most widely used code formatter, so the output matches what most projects use. SQL uses sql-formatter, and minification uses Terser and CSSO.

Is there a size limit?

There's no fixed limit. Very large files (several megabytes) can take a few seconds, depending on your device.

Last updated:

Related Dev tools