JSON to CSV converter

free

Flatten arrays of JSON objects into CSV with custom delimiters and headers.

JSON
259 chars · 259 BValid
CSV
id,sku,price,inStock
1,WIDGET-001,19.99,true
2,GADGET-002,49.5,false
3,GIZMO-003,14,true
88 chars · 88 B

Convert arrays of JSON objects to CSV with the small but important details that make CSV interop work: configurable delimiter for EU locales (semicolon), dot-notation flattening for nested objects, optional UTF-8 BOM for Excel encoding detection, and CRLF line endings for Windows-friendly output. Nested arrays serialize as embedded JSON inside the cell so the column count stays predictable.

Common use cases

  • Exporting API data to spreadsheets. Fetch a list endpoint, paste the JSON, get a CSV ready for Excel / Google Sheets. Turn on BOM if Excel mis-detects encoding on emoji / accented characters.
  • Generating fixtures for database imports. Most databases support CSV import (Postgres `COPY`, MySQL `LOAD DATA`). Convert your JSON test data once, import many times.
  • Sending a one-off data extract to non-technical stakeholders. Spreadsheets are still the universal data format. CSV opens cleanly in every spreadsheet app, no auth or shared infra required.
  • Generating reports from log dumps. Pipe a JSON-line log through `jq -s` to wrap it in an array, paste here, get a CSV for downstream analysis.

Frequently asked

Why does my input need to be an array of objects?

CSV is a flat 2D table — rows of fields. Without a top-level array of objects, there's no natural way to map JSON to rows and columns. Wrap a single object in `[...]` if you need one row.

How are nested objects handled?

Flattened with the delimiter you choose (default `.`). `{address: {city: "x"}}` becomes a column called `address.city`. Use `/` or `_` if your downstream tool doesn't like dots in column names.

What happens to arrays inside an object?

Embedded as JSON in the cell, e.g. `["a","b"]`. This preserves the data without exploding column count (which would happen with index-suffixed columns). Re-parse downstream with `JSON.parse(row.tags)`.

Why would I want a BOM?

Excel on Windows guesses file encoding and will mis-detect UTF-8 as Windows-1252, mangling accented characters and emoji. A UTF-8 BOM (0xEF 0xBB 0xBF) tells Excel the encoding explicitly. Modern tools ignore the BOM if present.

Why does the EU prefer `;` over `,`?

In most European locales the decimal mark is `,`, which clashes with comma-delimited CSV. Excel in those locales defaults to semicolon CSV instead.

When should I use CRLF line endings?

Strict CSV (RFC 4180) requires CRLF. Most modern tools accept LF, but if your output is going to a Windows-only tool or a strict parser, turn on CRLF.