CSV to JSON Converter
Paste CSV, get clean JSON. Quoted commas and line breaks are parsed per RFC 4180, dotted headers unflatten into nested objects, and numbers are only converted when the text round-trips exactly.
Runs entirely in your browser — your JSON is never uploaded.
Free conversion covers up to 1,000,000 characters per document — what Pro adds. The file you open is read locally by your browser; nothing is uploaded.
A worked example
Quoted commas stay inside one cell, and dotted headers become nested objects.
Input
id,user.name,user.role
1,"A, B",admin
2,C,viewerOutput
[
{"id":1,"user":{"name":"A, B","role":"admin"}},
{"id":2,"user":{"name":"C","role":"viewer"}}
]Numbers are converted only when they round-trip exactly, so IDs and leading zeroes are not silently rewritten.
How to convert CSV to JSON
- Paste your CSV into the input panel, open a .csv file, or press “Load example” for a file with quoted commas, empty cells and ambiguous numbers.
- Check the options Delimiter detection is on by default and handles Excel commas, European semicolons and TSV. Keep “first row is column names” on unless your file starts with data.
- Press Convert to JSON Records appear on the right, one object per row. Notes about ragged rows, renamed duplicate headers or the detected delimiter are listed under the output.
- Copy or download The output is pretty-printed JSON with two-space indent, ready to paste into a config, an API test or a seed script.
The typing rule: convert only what round-trips
Most converters turn anything numeric into a number, and that is where data gets rewritten without anyone noticing. Three concrete losses:
- Trailing zeros. The price text
19.50becomes the number19.5— and when it prints again, the zero is gone. - Leading zeros.
02134is a ZIP code, not the number 2134. Converting it breaks the address. - Big IDs. Any integer past 253 loses its final digits when stored as a double — the same precision ceiling every JSON number shares.
The rule this tool uses: a cell becomes a number only when String(Number(cell)) is the exact text it started from. Everything else — 19.50, 02134, 19-digit IDs, scientific notation — stays a string, so the JSON you get says what the CSV said.
Booleans follow the same standard: true and false convert; TRUE, yes and 1 do not, because a spreadsheet that stores TRUE as text meant it as text more often than not.
What the parser handles, strictly
- Quoted everything. Fields may contain the delimiter, doubled quotes and raw line breaks —
"Item: keyboard, USB"stays one cell. - Delimiter detection. Counts separators outside quotes, so semicolon files whose quoted cells contain commas are not misread.
- Unclosed quotes fail loudly. A missing closing quote is reported as an error rather than absorbed into one giant cell — the failure mode that makes other converters lose half a file silently.
- Ragged rows are padded, with a warning. Missing cells become null and surplus cells are dropped; the notes panel tells you it happened instead of letting the shape shift quietly.
Round-tripping with the JSON to CSV tool
The two converters on this site are designed as a pair. JSON to CSV flattens nested objects into dotted columns, writes null as an empty cell and prints numbers exactly. This tool reverses all three: dotted headers unflatten back into objects, empty cells become null, and the exactness rule accepts the numbers it produced.
The round trip is not universal — arrays inside rows travelled as JSON text in one cell, so they come back as strings. For flat-and-nested objects without arrays, what goes in is what comes out, cell for cell. The losses that survive a spreadsheet — rounded IDs, eaten leading zeros — are collected in Converting JSON to CSV: what breaks on the way.
DevTinyTools Pro
The free converter handles the payloads most people paste by hand. Pro raises the document cap and unlocks every other tool on the site:
- 10,000,000-character documents, roughly 10 MB of CSV
- The same Pro licence unlocks every tool on the site — conversion, diffing, type generation and batch ZIP export
- Priority fixes — conversion bugs move to the front of the queue
Pro is $29 one-time — a lifetime licence, sold through Lemon Squeezy as merchant of record, so VAT and sales tax are handled for you. Pro is a licence key — there is still no account. Buy DevTinyTools Pro, then activate it below and the higher limits unlock in this browser.