Converters
CSV to JSON Converter
Header-aware CSV parsing into clean JSON — pick the delimiter, keep IDs as strings or type them, and choose objects, arrays or JSON Lines.
In short
CSV to JSON reads the first row as the header and emits one JSON object per data row. Parsing is RFC 4180-aware (quoted fields may contain commas and line breaks), the delimiter is auto-detected or pinned, values that look numeric or boolean are typed unless you keep them as strings, and the output can be objects, arrays or JSON Lines.
By NaveenKumar T · Updated
Learn: How to Convert CSV to JSON in JavaScript, Python and the Browser
- Instant in-browser conversion
- Validates input first
- Delimiter, typing & output-shape controls
Runs entirely in your browser — nothing you paste or open here is uploaded, logged, or stored.How we handle data →
Example
CSV to JSON: input and output
A sign-up export with typed columns (numbers, true/TRUE/false), ISO timestamps in two time zones, an empty cell, and quoted fields that contain commas and doubled quotes.
id,name,email,plan,active,signed_up,referrals,address
1001,Ada Byron,ada@example.org,pro,true,2026-06-01T09:15:00Z,3,"12 King St, Bath"
1002,Grace Hopper,grace@example.org,team,TRUE,2026-06-02T17:40:00+02:00,0,
1003,"Lin, Wei",wei@example.org,free,false,2026-06-03T08:00:00Z,,"Unit 4, ""The Mill"""[
{
"id": 1001,
"name": "Ada Byron",
"email": "ada@example.org",
"plan": "pro",
"active": true,
"signed_up": "2026-06-01T09:15:00.000Z",
"referrals": 3,
"address": "12 King St, Bath"
},
{
"id": 1002,
"name": "Grace Hopper",
"email": "grace@example.org",
"plan": "team",
"active": true,
"signed_up": "2026-06-02T15:40:00.000Z",
"referrals": 0,
"address": null
},
{
"id": 1003,
"name": "Lin, Wei",
"email": "wei@example.org",
"plan": "free",
"active": false,
"signed_up": "2026-06-03T08:00:00.000Z",
"referrals": null,
"address": "Unit 4, \"The Mill\""
}
]id and referrals are numbers, active is a boolean even for the upper-case TRUE, and the empty cells became null. The +02:00 timestamp was recognised as a date and normalised to 15:40 UTC, and the quoted fields — a name with a comma and an address with doubled quotes — were unwrapped correctly.
Learn more
How CSV to JSON conversion works
The first row is treated as the header: each subsequent row becomes a JSON object whose keys are the column names. Parsing is RFC 4180-aware — quoted fields may contain commas, escaped quotes (""), even line breaks. The delimiter is auto-detected from comma, semicolon, tab and pipe, and can be pinned in the rail when a file mixes them; values that look like numbers or booleans become real JSON numbers and booleans unless you switch Values to keep everything as strings. The parser is PapaParse, the same open-source engine most browser CSV tools rely on, running entirely in your tab.
Output defaults to a JSON array of objects at your chosen indentation — the shape virtually every API, database loader and JavaScript function expects. Array of arrays keeps the positional form (header row first) for spreadsheets and charting libraries, and JSON Lines emits one compact object per line for mongoimport, BigQuery, jq and log pipelines.
When to convert CSV to JSON
Spreadsheets are where business data lives; JSON is what your code eats. Export the sheet as CSV, convert here, and seed your API fixtures, NoSQL collections, or front-end mock data in seconds. Developers also use this to inspect machine-generated CSVs — converting to JSON then viewing the tree exposes typing and column drift instantly.
Help
Frequently asked questions
Everything you need to know about the CSV to JSON.
01Does my CSV need a header row?
For the default "Array of objects" output, yes: the first row becomes the keys of every object. A file with no header turns its first data row into keys. Switch Output to "Array of arrays" to keep the positional form — the header row is then the first inner array — or add a header line at the top of the input before converting.
02How does type detection work — and can it be wrong?
Values that parse cleanly as numbers or booleans are converted (42, 3.14, 1e3, true, TRUE); everything else stays a string. Quoting a cell does not opt it out — the parser types quoted and unquoted cells alike — so identifiers with leading zeros lose them: ZIP code 01234 becomes 1234 and order id 00721 becomes 721. If any column must stay textual, set Values to "Keep everything as strings" before converting; every cell is then emitted exactly as written.
03How are empty cells, ISO timestamps, and rows with the wrong number of cells handled?
An empty cell becomes null rather than an empty string. A full ISO 8601 timestamp with a time zone, such as 2026-06-03T10:00:00+02:00, is recognised as a date and re-emitted normalised to UTC (2026-06-03T08:00:00.000Z); a bare date like 2026-06-03 stays a string. Rows shorter than the header simply omit the missing keys from that object, and a row with extra cells keeps the surplus under a __parsed_extra array, so nothing is silently dropped.
04My CSV uses semicolons or tabs — why did every row become one long key?
Because the delimiter was not recognised, so each line was read as a single column. Auto-detect works when the file is consistent; it can miss when the first lines contain commas inside quoted values or when a European Excel export uses ; because the locale's decimal separator is a comma. Pick Semicolon, Tab or Pipe in the Delimiter control and convert again — tab-separated .tsv exports convert exactly like CSV once Tab is selected.
05How do I get one object per line (JSON Lines / NDJSON) for MongoDB, BigQuery or jq?
Set Output to "JSON Lines". Each CSV row becomes one compact JSON object on its own line with no surrounding array and no trailing commas, which is what mongoimport (without --jsonArray), BigQuery batch loads, and jq -c expect. The indentation control does not apply in this mode, and the Tree view does not, because a JSON Lines file is many documents, not one.
06Can I turn the JSON back into the same CSV?
JSON to CSV writes null as an empty cell, [] and {} as literal text, booleans as true/false, and flattens nested objects to dot-path columns, so a round trip preserves flat records exactly and re-types numeric-looking values on the way back. Column order follows the order keys first appear in the JSON, which is the CSV's header order.
Keep working
Related tools
JSON to CSV
Converters
CSV to XML
Converters
CSV to YAML
Converters
CSV to HTML
Converters
CSV Escape
RFC 4180 field escaping — values with commas, quotes, or line breaks wrapped and doubled correctly, and unwrapped just as cleanly.
EXCEL to HTML
Copy cells in Excel, paste here, get a clean semantic table — escaped, previewable, ready for any page.
Learn the format
Related guides
How to Convert CSV to JSON in JavaScript, Python and the Browser
Tested CSV to JSON code for Node (papaparse) and Python (csv.DictReader), plus type inference, nested output, streaming, and the trip back to CSV.
7 min readGuide · Data FormatsHow to Convert Excel to JSON (Without Writing Code)
Turn Excel or Google Sheets data into clean JSON in under a minute: paste cells directly or export CSV — with typed numbers, booleans, and proper quoting.
2 min readGuide · Data FormatsWhat is a CSV File? The Format Everyone Uses and Nobody Reads About
CSV explained properly: the RFC 4180 rules, how quoting really works, why Excel mangles your data, and when CSV beats JSON (and when it doesn't).
2 min read