RFC 4180 · auto-flatten · client-side

Convert JSON to downloadable CSV, instantly

Paste a JSON array of objects. Get a clean CSV with auto-detected headers and your choice of comma, semicolon, or tab delimiter.

JSON to CSV Workspace
Input size
305 B
5 lines
Output size
143 B
3 rows
Columns
5
Comma separated
Status
Valid
RFC 4180
Delimiter
input · json array
output · csv
id,name,role,active,joined
1,Ada Lovelace,admin,true,2024-01-15
2,Linus Torvalds,engineer,true,2024-03-04
3,Grace Hopper,admin,false,2024-05-22
Step-by-step Tutorial

How to convert JSON to CSV: a complete step-by-step guide

Turn any array of JSON objects into a spreadsheet-ready CSV without a script. Nested objects flatten to dot-notation columns; the union of all keys becomes the header row, so rows with missing fields stay aligned. Everything happens in your browser — no upload, no sign-up.

  1. 01

    Paste a JSON array of objects

    The converter accepts a top-level array [ { ... }, ... ]. Each element should be an object — anything else (top-level object, scalar, nested array) will error with the precise position.

    Both pretty-printed and minified JSON work. Drop in API responses, exported analytics, MongoDB find() results, DynamoDB scans, or a Postgres row_to_json() dump.

    Need to reshape first? Pipe through the JSON Formatter or JSON Query to project the exact array you want before converting.

    array of objectsAPI responseMongoDB findDynamoDB scananalytics export
    input · json array3 objects
    [
      {"name":"Ada","role":"admin"},
      {"name":"Linus","role":"engineer"}
    ]
    98 B · 4 linesvalid · loaded
  2. 02

    Choose your delimiter and escape strategy

    Pick , (US / Excel default), ; (most European locales where commas are decimal separators), or \t (TSV — friendlier when fields contain commas and unambiguous for most pipelines).

    Cells containing the delimiter, double quotes, line feeds, or carriage returns are wrapped in "..." and any inner quotes are doubled (" → ""), exactly as RFC 4180 § 2 prescribes. No bespoke escaping — Excel, Numbers, and csv in Python's stdlib all read it identically.

    For TSV consumers that disallow embedded tabs, switch the delimiter then strip or replace them upstream.

    RFC 4180 § 2CRLF-safequoted fieldsdoubled quotesTSV
    output · comma-separatedRFC 4180
    name,role
    Ada,admin
    Linus,engineer
    47 B · 3 linesspreadsheet-ready
  3. 03

    Headers from the union of keys

    The header row is the union of all keys across every row in input order — missing fields render as empty cells, never the literal strings null or undefined. This keeps columns stable when rows are heterogeneous (a common shape for API list-endpoints with optional fields).

    Nested objects flatten with dot-notation: {"address.city"}, {"profile.bio.tagline"}. Arrays inside cells are JSON-encoded so the document round-trips cleanly back through CSV to JSON.

    Heavily-nested input? Run it through Flatten JSON first to inspect the projected key set before converting.

    dot.notationunion of keysstable columnsempty vs nullJSON-encoded arrays
    rows w/ different keysheader union
    id,name,age
    1,Ada,
    2,,30
    3,Linus,42
    37 B · 4 lines · 3 colsmissing → empty
  4. 04

    Copy or download as .csv

    One click sends the CSV to your clipboard for pasting into Excel, Google Sheets, Numbers, or Notion. Or download as .csv ready to import into Postgres (COPY ... FROM), MySQL (LOAD DATA INFILE), BigQuery (bq load), or any BI tool.

    Need a UTF-8 BOM for Excel on Windows? Pick Excel-friendly CSV from the download menu — it prepends EF BB BF so non-ASCII text renders correctly without the import wizard.

    Everything runs in the browser — open DevTools → Network to verify zero outbound requests.

    clipboard.csvUTF-8 BOMExcel-readyprivacy-first
    export3 actions
    ✓ Copied to clipboard
    ✓ Saved: output.csv
    ✓ 0 outbound requests
    ✓ 100% client-side
    ready to shipRFC 4180 · success
Pro tips

Production-grade JSON → CSV tips

Flatten before exporting

Nested objects auto-flatten to parent.child. For deeply nested arrays, use a JSON Query tool first to project the shape you want.

Excel locale quirks

European Excel often defaults to semicolon-separated. Open with Data → From Text and choose the delimiter explicitly to avoid surprises.

Keep BOM in mind

Excel sometimes mis-detects UTF-8 without a BOM. Pipe the output through a tool that prepends 0xEF 0xBB 0xBF if you see corrupted characters.

Big-integer precision

JavaScript loses precision past 2^53−1. Stringify IDs in your source JSON to keep them intact.

Empty vs null

Missing fields render as empty cells, not the literal string null. Cleanest for downstream tooling.

Database-ready

Output works with COPY ... FROM in Postgres, LOAD DATA INFILE in MySQL, and bq load in BigQuery.

Use Cases

When to convert JSON to CSV

Anywhere a spreadsheet eats data better than JSON. Here are the workflows engineers, analysts, and ops teams reach for it.

Excel & Google Sheets

Drop API responses into a spreadsheet for sorting, pivoting, and filtering — no formulas required. 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.

open in seconds

Database imports

Bulk-load with COPY (Postgres), LOAD DATA INFILE (MySQL), bq load (BigQuery), or any ETL pipeline.

faster than INSERTs

Stakeholder reports

Email a CSV instead of asking PMs to read JSON. Opens in any tool they already use. 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.

no devtools needed

BI tool ingestion

Tableau, Looker, Metabase, and PowerBI all accept CSV. Skip the connector setup for one-off explorations. 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

Audit logs & tracking

Convert webhook logs or event streams to CSV for archival, compliance review, or quarterly reports. 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

Test fixture generation

Snapshot real API data, edit in a spreadsheet, then re-import elsewhere. A common QA workflow. 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

Quick answers about JSON → CSV conversion.

An array of flat objects gives the cleanest CSV. Nested objects flatten with dot notation (e.g. address.city). Arrays inside cells are JSON-encoded.
Yes. Download and double-click, or paste from the clipboard. On European locales, use the Semicolon delimiter to avoid Excel splitting on the decimal comma.
The header row is the union of all keys across rows. Missing fields render as empty cells — not the literal strings null or undefined.
Per RFC 4180, fields containing the delimiter, quotes, newlines, or carriage returns are wrapped in double quotes with inner quotes doubled.
No. Parsing and CSV generation run locally. Open DevTools → Network to confirm zero requests.
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!