Developer Tools

CSV to JSON Converter

Paste CSV or open a file and get clean JSON. The delimiter is detected automatically, the first row becomes the keys, and numbers can be converted to real numeric values.

  • Runs in your browser
  • No sign-up
  • Free to use

How to use CSV to JSON

  1. Paste CSV text or open a .csv file exported from Excel, Google Sheets or a database.
  2. Leave the delimiter on Auto-detect, or choose it yourself.
  3. Choose whether the first row holds column names and whether to convert numbers, booleans and empty cells.
  4. Select Convert to JSON, then copy or download the result.

CSV to JSON features

Delimiter auto-detection

Recognises comma, semicolon, tab and pipe separated files without configuration.

Proper quoted-field handling

Commas, line breaks and escaped quotes inside quoted fields are parsed correctly.

Typed values

Optionally converts 42 to a number, true/false to booleans and empty cells to null.

Objects or arrays

Output an array of objects keyed by header, or an array of arrays for compact data.

Helpful errors

An unclosed quote is reported with the line where it starts.

Local processing

Your spreadsheet data never leaves the browser.

When to use CSV to JSON

  • Seeding a database or mock API from a spreadsheet.
  • Turning an exported report into JSON for a script or chart library.
  • Converting a translation or product list maintained in Excel into an app config file.
  • Inspecting a CSV export in a structured form.

CSV to JSON FAQ

How do I get a CSV file out of Excel?

Use File → Save As and choose “CSV UTF-8 (Comma delimited)”. In Google Sheets use File → Download → Comma-separated values.

What if my file uses semicolons?

Auto-detect handles it. Semicolon-separated files are common in regions where the comma is the decimal separator.

Will leading zeros be kept?

Yes. Values such as 00123 or phone numbers starting with + are left as strings even when number conversion is on, so identifiers are not damaged.

What happens with duplicate or empty column names?

Empty headers are named column_1, column_2 and so on. A repeated header gets a numeric suffix so no data is overwritten.

How are rows with too few or too many cells handled?

Missing cells become null (or an empty string) and extra cells are stored under generated column names, so nothing is silently dropped.

Why CSV needs careful parsing

CSV looks trivial, split on commas and line breaks, until a value contains a comma or a line break. The format handles that by wrapping such values in double quotes and writing a literal quote as two quotes. A parser therefore has to track whether it is inside a quoted field, which simple string splitting cannot do.

CSV also carries no type information: every cell is text. JSON distinguishes strings, numbers, booleans and null, so a converter must decide how to interpret each cell. This tool converts only values that are unambiguously numeric or boolean, and leaves everything else, including codes with leading zeros, as strings.

Other useful tools