CSV to JSON
Paste a CSV, get an array of typed JSON objects, quoted commas handled, delimiter detected, numbers arriving as numbers. The reverse direction is one toggle away.
Guide
How to use it
- Paste the CSV (or tap the sample to see the shape). The delimiter, comma, semicolon, tab or pipe, is detected from the first line.
- Keep First row is headers ticked to get objects keyed by column name, untick it for plain arrays.
- Read the JSON preview: numbers, booleans and nulls arrive typed, everything else stays a string.
- Copy or download. Ragged rows (a stray comma somewhere) are flagged rather than silently mangled.
Examples
The cases that break naive converters
A comma inside quotes is data, not a delimiter. The parser here is state-machine RFC-style: quoted fields, embedded quotes ("") and multi-line cells all survive.
Continental Excel exports use semicolons (comma being the decimal separator). Auto-detection reads the first line and adapts, no setting to hunt for.
Type coercion with judgement: 42 becomes a number, true a boolean, but 007 and long ID digits stay strings, leading zeros are data the moment they exist.
Method
How it works
Parsing is a character-walk state machine (in-quotes or not), the approach every serious CSV library uses, because split-on-comma dies at the first quoted address. Headers become object keys with blanks auto-named, and values coerce conservatively: clean numerics, true/false and null convert, ambiguous strings do not.
The reverse direction flattens nested objects with dot notation (user.name becomes a column) and quotes anything containing delimiters, so the round trip is Excel-safe. All of it local, half-megabyte files parse in a blink.
FAQ
Frequently asked questions
How big a CSV can it take?
Up to about half a megabyte pasted, tens of thousands of rows. Beyond that you want a script rather than a page, and honestly, a database.
Why did my ID numbers gain quotes?
Leading zeros or 16+ digits: converting those to JSON numbers would corrupt them (Excel’s favourite crime). The tool keeps them as strings deliberately.
Can it produce nested JSON from dot columns?
The reverse direction flattens nested to dots. Un-flattening dots to nesting on the way in is deliberately not guessed at, ambiguity lives there.
What about the header row when converting back?
JSON to CSV takes the union of keys across all objects as columns, missing values become empty cells, extra keys get their own column.
My file uses tabs, is that CSV?
TSV, and it works: tab is one of the auto-detected delimiters. Pasting from Excel directly usually arrives as tabs.
Is my data uploaded?
No. Customer lists and exports parse entirely in your browser’s memory.
More tools