JSON to CSV

Paste a JSON array of objects (the shape most APIs return for lists) and the converter turns each object into a CSV row. Auto-detects the column headers from the keys, flattens nested objects into dot-notation columns, and handles arrays by either joining with a separator or creating one column per index.

How to convert JSON to CSV

  1. 1

    Paste the JSON array

    Usually `[{...}, {...}, ...]`. If you have a wrapped payload like `{"data": [...]}`, provide the inner array.

  2. 2

    Pick delimiter and quote style

    Comma, tab, semicolon or pipe. Choose whether to always quote or only when needed.

  3. 3

    Pick nested-object handling

    Flatten to `user.name`, `user.email`, or serialize as JSON strings inside a single column.

  4. 4

    Download the CSV

    Save the CSV or copy it. Headers go on the first row unless you disable them.

Example

Input:

[
  { "id": 1, "user": { "name": "Alice", "email": "a@a.com" }, "tags": ["admin"] },
  { "id": 2, "user": { "name": "Bob",   "email": "b@b.com" }, "tags": ["user", "beta"] }
]

Output (flatten nested, join arrays):

id,user.name,user.email,tags
1,Alice,a@a.com,admin
2,Bob,b@b.com,"user,beta"

Delimiter choice

Delimiter Use when
, (comma) Default, works with Excel and Google Sheets
; (semicolon) European Excel locales that treat , as decimal
\t (tab) Clean paste into Google Sheets, avoids quoting issues
` ` (pipe)

Quoting rules

A field must be quoted when it contains:

  • the delimiter
  • a double quote (which is escaped by doubling: " -> "")
  • a newline

“Always quote” is safer for cross-tool compatibility; “quote only when needed” makes the file easier to read manually.

Nested object handling

  • Flatten: { user: { name: "A" } } becomes a user.name column. Deep paths become a.b.c.d.
  • JSON string: the nested object stays as a single-column JSON value: "{\"name\":\"A\"}". Useful when downstream tools can parse it.
  • Stringify: joins with a separator, losing the structure.

Array handling

  • Join: ["a", "b"] becomes "a,b" in a single column.
  • Indexed columns: produces tags.0, tags.1, tags.2, works only when array length is consistent.
  • First element only: takes tags[0] and ignores the rest.

Common mistakes

  • Uneven keys across objects. If one object has phone and another does not, CSV gets a phone column with empty cells for the missing rows. Always validate that the key set is consistent.
  • Forgetting BOM for Excel. Excel on Windows reads UTF-8 CSVs without BOM as Latin-1 and garbles accented characters. The tool offers a “prefix UTF-8 BOM” toggle for that case.
  • Embedding newlines in values. Legal in RFC 4180 CSV, but some importers choke. If your target is fragile, replace \n with a space or \\n token.
  • Using Excel as a round-trip format. Excel silently converts 007 to 7, truncates long numbers, and corrupts leading zeros in IDs. For data integrity, use CSV with a proper parser.

Frequently Asked Questions

Yes, CSV is inherently tabular, which maps to [{...}, {...}, ...]. If your payload is wrapped ({"data": [...]}), pass just the inner array, or let the tool auto-detect it.

You choose: flatten to dot-notation columns (user.name, user.email), keep as JSON strings in a single column, or stringify with a separator. Flatten is the default and usually what you want.

Yes, if you pick a comma delimiter and the locale matches. For European Excel, switch to semicolon. For UTF-8 characters, enable the “prefix UTF-8 BOM” option so Excel detects the encoding.

No. Conversion runs in your browser; the JSON never leaves your machine. Safe for sensitive API responses or internal data dumps.

Related Tools

Tool available in other languages