Skip to content

JSON to CSV converter

JSON to CSV runs through our table engine, turning records into a header row built from every key found across the data.

  • Converted with Table engine · nothing stored
  • Free: 5 conversions a day · 5 MB each
  • Higher limits →

From real runs

What you get — and what changes

  • Record array Kept

    A top-level array of objects maps cleanly to one CSV row per object.

  • Header Changed

    The CSV header is the union of keys across all records, not just the first object, so late fields still get columns.

  • Nested objects Changed

    With flattening on, nested objects become dot.path columns such as customer.email and shipping.city.

  • Arrays Changed

    Arrays can be serialized into JSON strings or expanded into indexed columns such as variants.0.sku and variants.1.sku.

  • Missing fields Changed

    If one record lacks a key present in another, its CSV cell is left empty.

  • Unicode Kept

    Emoji, accents, CJK text, and other Unicode characters are kept as UTF-8.

  • Excel compatibility Changed

    The BOM option prepends a UTF-8 byte order mark so older Excel builds open non-ASCII characters correctly.

Sample conversions

Products with nested variants

Input
JSON: [{"id":"p-100","name":"Hoodie","variants":[{"sku":"H-BLK-S","price":49},{"sku":"H-BLK-M","price":49}],"seo":{"title":"Warm hoodie"}}]
Output
CSV with flattening: id,name,variants,seo.title by default; arrays are JSON strings unless indexed-array columns are selected.

Late-arriving keys

Input
JSON: [{"email":"ada@example.com"},{"email":"bo@example.com","plan":"Pro"}]
Output
CSV header becomes email,plan. Ada's plan cell is empty instead of dropping the Pro column.

Unicode export for Excel

Input
JSON: [{"city":"München","note":"東京 launch 🚀"}]
Output
UTF-8 CSV keeps the characters; enable bom when the recipient opens the file in desktop Excel.

A real JSON → CSV run

We converted our JSON sample (557 B) with Table engine on 2026-09-11. It took 1 ms and produced a 225 B CSV file, 60% smaller than the input. The engine raised no warnings.

Input · sample.json · 557 B

Array of 4 objects; keys: company, stage, arr, owner, close_date

Records
4
Keys
company, stage, arr, owner, close_date

Output · sample.csv · 225 B

4 data rows × 5 columns; header: company,stage,arr,owner,close_date

Rows
4
Columns
5
Header
company,stage,arr,owner,close_date

First lines of the output

csv
company,stage,arr,owner,close_date
Northwind Traders,Proposal,48000,R. Ayers,2026-10-14
Contoso Ltd,Negotiation,120000,P. Ng,2026-09-30
Fabrikam,Qualified,22500,R. Ayers,2026-11-02
Tailspin Toys,Won,64000,M. Okafor,2026-09-03

Options and when to change them

flatten
Turn on for analytics tools that need scalar columns; leave off only when nested values should remain JSON strings.
flattenSeparator
Use dot paths for common BI tools, or switch separators if your field names already contain dots.
arrayMode
Use JSON strings for variable-length arrays; use indexed columns when every record has the same small array shape.
bom
Enable when the CSV will be opened in Excel and contains Unicode names, emoji, or non-Latin scripts.

Do it yourself

pandas json_normalize

bash
python - <<'PY'
import pandas as pd
records = pd.read_json("products.json")
pd.json_normalize(records.to_dict(orient="records")).to_csv("products.csv", index=False)
PY

json_normalize expands nested objects well but arrays usually need custom handling.

jq to CSV

bash
jq -r '
  (map(keys) | add | unique) as $cols |
  $cols, map([.[ $cols[] ]])[] | @csv
' in.json > out.csv

This keeps only top-level keys; flatten nested JSON first when you need dot.path columns.

JSON to CSV by API or MCP

The HTTP API and the MCP server run the exact engine this page uses (Table engine); the response carries the same warnings the web converter shows. Check support first with GET /api/v1/pairs?from=json&to=csv.

curl
curl -X POST https://filetypeconverters.com/api/v1/convert \
  -H "Authorization: Bearer $FTC_API_KEY" \
  -F "file=@input.json" -F "from=json" -F "to=csv" \
  -F 'options={"encoding":"utf-8"}' \
  --output output.csv

Options this engine accepts for JSON → CSV

KeyApplies toTypeDefault
encodingReading JSONutf-8 · latin1utf-8
flattenSeparatorReading JSONstring.
arrayModeReading JSONjson · explodejson
delimiterWriting CSVstring,
newlineWriting CSV ·
API reference

When this is the wrong conversion

  • JSON to CSV is lossy for nested arrays; keep JSON or Parquet when hierarchy is the important part of the data.
  • If values are huge documents or rich HTML, CSV quoting can make the output hard to review.
  • For streaming logs, use JSONL to CSV so one bad line can be isolated without loading a whole JSON array.

JSON to CSV questions

How are nested JSON objects converted to CSV?

Flattening turns nested properties into dot.path columns, so {customer:{email}} becomes customer.email.

What happens when records have different keys?

The header is the union of keys across all records. Missing values in individual records become empty CSV cells.

Should I enable the Excel BOM option?

Enable it when your CSV has Unicode and will be opened in Excel. Leave it off for systems that require a plain UTF-8 CSV without a BOM.