RFC 4180 · auto-detect delimiter

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.

CSV → JSON Workspace
Input size
143 B
4 lines
Output size
362 B
3 rows
Columns
5
Auto
Status
Valid
RFC 4180
Delimiter
input · csv
output · json
[
  {
    "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"
  }
]
Quick Start

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.

  1. 01

    Paste CSV

    Drop any CSV. Quoted fields with commas/newlines are handled per RFC 4180.

    Inputs parse through the native JSON.parse reviver chain — strict RFC 8259. Any syntax error returns line and column for the exact offending byte.

    RFC 4180quotedRFC 8259JSON.parsestrict
    input · raw.csv · RFC 8259
    name,age
    Ada,36
    loaded · parsed RFC 8259RFC 8259 · ready
  2. 02

    Pick delimiter

    Default Auto sniffs the most common separator in the first line. Override if needed.

    autocommasemitab
    detectedcomma
    name,age → {"name":"Ada","age":36}
    smart
  3. 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 useMemo with stable hashing so options re-apply instantly — no full re-parse if only formatting changes.

    headersobjectsmemoisedinstantdiff-friendly
    shape · renderedobjects · ready
    [{"name":"Ada","age":36}]
    rendered · livediff-friendly
  4. 04

    Copy or download .json

    Round-trip with JSON to CSV, or feed downstream tooling.

    Download is a Blob with application/json; copy uses the Async Clipboard API. Both round-trip identically to what the page rendered.

    copydownloadclipboardblob.json
    export · copiedready · done
    ✓ Copied
    ✓ Saved
    shipped · ready to shipsuccess
Pro tips

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.

Use Cases

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 scan

Test 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 diffs

Bulk 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 valid

Mock 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 safe

Webhook 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-friendly

CMS 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-ready
FAQ

Frequently asked questions

Yes — picks the most frequent of comma, semicolon, or tab in the first line. Override manually if needed.
Yes. true/false → boolean, integers → number, decimals → number, null → null, otherwise string.
Yes, per RFC 4180 — wrapped quotes are unwrapped, doubled inner quotes become single.
Quoted fields can span newlines — supported.
No. All parsing runs locally.
Suggest a tool

Something missing?

Tell us what you need. We ship the top requests every two weeks.

Sent straight to the maintainers · no account needed
47 in queue·8 shipped this month
Request queued. Thanks!