CSV to JSON Converter

Convert CSV to JSON online. Auto-detects the delimiter, infers numbers, booleans and nulls, handles quoted fields, and outputs a clean array of objects — in your browser.

All conversion happens locally in your browser. No data is sent to any server. Your CSV stays completely private.

What It Does

This tool turns CSV — the tabular format spreadsheets and databases export — into JSON, the format code and APIs consume. It treats the first row as the header, so each column name becomes a key, and every data row becomes one object in the output array. Two things make raw CSV tricky, and the tool handles both. First, delimiters vary: a comma in the US, a semicolon in much of Europe, a tab when you paste from a spreadsheet — so it auto-detects which one your file uses. Second, CSV is all text, but JSON has real types — so it can infer numbers, booleans, and nulls, while deliberately preserving things like leading-zero codes that must stay strings. It also parses quoted fields properly (RFC 4180), meaning a value like "Smith, John" stays a single field instead of splitting your columns. After converting, it tells you what it saw: the detected delimiter, the row and column counts, which columns became numbers or booleans, and whether any rows didn't line up with the header.

When to Use It

  • You exported data from a spreadsheet or database as CSV and need it as JSON to feed an API, a script, or a front-end app.
  • You're seeding a database or a test fixture and want an array of typed objects rather than raw strings.
  • A colleague sent a semicolon- or tab-delimited file and you need clean JSON without wrestling with the delimiter by hand.
  • You want to sanity-check a CSV — spot ragged rows, empty cells, or values that won't type-convert — before importing it somewhere.

Worked Examples

name,age,active Ada,36,true Alan,41,false

A basic comma CSV with a header. Each row becomes an object; with type inference on, age becomes a number and active becomes a real boolean rather than the strings "36" and "true".

id;city;zip 1;London;007 2;Paris;75001

Semicolon-delimited (a common European export). The tool auto-detects the semicolon, and note that zip 007 is kept as a string so its leading zero survives, while plain numbers are converted.

product,note Cable,"1m, USB-C" Adapter,"Says ""fast"" charge"

Quoted fields per RFC 4180. The comma inside "1m, USB-C" does not split the column, and the doubled quotes "" decode to a single literal quote in the output.

Features

CSV to a JSON array of objects in real time
Automatic delimiter detection (comma
semicolon
tab
pipe)
Manual delimiter override
Type inference for numbers
booleans and null
Leading-zero guard so codes stay strings
RFC 4180 quoted-field parsing
Header row toggle with auto col1
col2 naming
Ragged-row detection
Per-column type summary
File upload and drag-and-drop
Copy and download the JSON
Browser-only processing with no server uploads

How to Use

1. Paste or upload your CSV in the input area. 2. Leave the delimiter on Auto or pick one, and choose whether the first row is a header and whether to infer types. 3. The JSON array appears instantly, with a panel describing the delimiter, columns, and any warnings. 4. Click Copy or Download to save the result.

Common Mistakes

  • Leaving type inference on for identifier columns. ZIP codes, phone numbers, and account IDs can lose leading zeros or overflow precision when turned into numbers — turn inference off, or rely on the leading-zero guard, for those files.
  • Assuming a comma delimiter. Many exports use semicolons or tabs; if your columns look merged into one, check (or force) the delimiter.
  • Ignoring ragged-row warnings. A row that doesn't match the header width usually means a missing value or an unescaped delimiter — fix the source rather than trusting the lopsided output.
  • Forgetting to quote fields that contain the delimiter. If your source CSV wasn't quoted properly, a comma inside a value will be read as a new column — that's a problem in the input file, not the conversion.

Frequently Asked Questions

Explore related topics

#Developer #JSON #Converter