Parse CSV into structured JSON
Auto-detect delimiter, use the first row as keys (or not), and coerce types (numbers, booleans, null) on the fly.
[
{
"id": 1,
"name": "Ada Lovelace",
"role": "admin",
"active": true,
"joined": "2024-01-15"
},
{
"id": 2,
"name": "Linus Torvalds",
"role": "engineer",
"active": true,
"joined": "2024-03-04"
},
{
"id": 3,
"name": "Grace Hopper",
"role": "admin",
"active": false,
"joined": "2024-05-22"
}
]How to convert CSV to JSON
The reverse of JSON to CSV. Drop in any CSV — Excel export, BigQuery dump, analytics download — and get a clean JSON array ready for your code.
- 01
Paste CSV
Drop any CSV. Quoted fields with commas/newlines are handled per RFC 4180.
Inputs parse through the native
JSON.parsereviver chain — strict RFC 8259. Any syntax error returns line and column for the exact offending byte.RFC 4180quotedRFC 8259JSON.parsestrictinput · raw.csv · RFC 8259name,age Ada,36
loaded · parsed RFC 8259RFC 8259 · ready - 02
Pick delimiter
Default Auto sniffs the most common separator in the first line. Override if needed.
autocommasemitabdetectedcommaname,age → {"name":"Ada","age":36}smart - 03
Header or array-of-arrays
If first row is headers, output is an array of objects. Otherwise, an array of arrays.
Large documents stream through a
useMemowith stable hashing so options re-apply instantly — no full re-parse if only formatting changes.headersobjectsmemoisedinstantdiff-friendlyshape · renderedobjects · ready[{"name":"Ada","age":36}]rendered · livediff-friendly - 04
Copy or download .json
Round-trip with JSON to CSV, or feed downstream tooling.
Download is a
Blobwithapplication/json; copy uses the Async Clipboard API. Both round-trip identically to what the page rendered.copydownloadclipboardblob.jsonexport · copiedready · done✓ Copied ✓ Saved
shipped · ready to shipsuccess
Production-grade JSON, the right way
Stick to RFC 8259
Strict JSON has no NaN, Infinity, comments, or trailing commas. If you need those, look at JSON5 or JSON Repair.
Preserve key order for diffs
JavaScript preserves insertion order, but two parsers shouldn’t be assumed equal. Use Sort JSON Keys before diffing or hashing.
Big integers lose precision
JS numbers lose precision past 2^53−1. Transport large IDs as strings or use BigInt.
Escape inside HTML
When inlining JSON inside <script>, escape </ to <\/ so HTML parsing doesn’t close your tag early.
Validate at boundaries
Trust the wire as little as possible. Run incoming JSON through a schema (Zod / Pydantic) before it touches business logic.
Minify in production
Minify removes whitespace; gzip removes redundancy. Together they typically shrink JSON payloads 70–85% over the wire.
When to convert CSV to JSON
Anywhere your code wants typed objects but the source is a flat spreadsheet.
API request bodies
Build POST payloads from CSV exports without writing a parser. Output round-trips losslessly through JSON.parse + JSON.stringify, so the file you save is byte-identical to what you see. Streaming parsers, jq pipelines, and Postgres jsonb columns all accept the result without complaint.
10× faster to scanTest fixtures
Spreadsheet of test cases → typed JSON fixtures for your test runner. Pairs perfectly with sort-keys + diff for review-friendly fixtures in CI. Whitespace-only churn disappears and reviewers see real changes, which keeps PR comments focused on logic rather than indentation.
cleaner PR diffsBulk imports
Convert exported Sheets/Excel/BigQuery dumps for NoSQL ingestion. Handles emoji and non-ASCII via UTF-8 throughout — your data survives copy-paste between editors, terminals, and IDEs. Combining marks and ZWJ sequences come out the other side intact.
RFC 8259 validMock data
Stakeholders deliver spreadsheets; you need JSON to build the UI. Re-parses on every keystroke so syntax errors are caught at the exact character. Strict RFC 8259 — no trailing commas, no comments, no unquoted keys — keeps downstream parsers happy.
round-trip safeWebhook generation
Build batched webhook bodies from analytics exports. Streams large documents without a server round-trip — privacy stays in the tab. Heavy parsing runs through useMemo so even 5 MB payloads keep the editor responsive.
schema-friendlyCMS migrations
Editorial teams maintain content in Sheets — convert to JSON before importing. Output is byte-stable: same input plus same options always produces identical bytes, ideal for content-addressed caches and snapshot tests. Downloads ship with the application/json MIME so editors apply syntax highlighting.
production-readyFrequently asked questions
Something missing?
Tell us what you need. We ship the top requests every two weeks.