Developer

Encoders, converters & dev utilities

12 tools
Developer · Data-Format Converter (JSON ↔ CSV / YAML / XML)

JSON to CSV Converter

Convert a JSON array of objects into CSV (comma-separated values) that opens cleanly in Excel, Google Sheets or any data tool. The converter takes the union of every object's keys as the header row, then emits one CSV record per object, flattening nested objects into dotted-path columns (a.b.c) so no data is silently dropped. Every field is quoted per RFC 4180 whenever it contains a comma, a double-quote or a newline, with embedded quotes escaped by doubling them ("" ). JSON is parsed per RFC 8259. It all runs 100% in your browser — paste a real API payload and it never leaves the page (check the network tab). Free, no login.

Quick answer

Header = union of all object keys (first-seen order); one CSV record per array element

  • Worked example — [{"id":1,"name":"Ada"}] → header id,name then row 1,Ada
  • Nested objects flatten to dotted columns: {"a":{"b":1}} → column a.b
  • RFC 4180 quoting: fields with a comma/quote/newline are wrapped in "…"; an inner " is escaped as ""
  • JSON parsed per RFC 8259; conversion is 100% client-side — your payload never leaves the browser
Open the full Data-Format Converter (JSON ↔ CSV / YAML / XML)

Frequently asked questions

How do I convert JSON to CSV?

Paste a JSON array of objects (for example [{"id":1,"name":"Ada"},{"id":2,"name":"Lin"}]) and the tool builds a CSV whose header row is the union of every object's keys and whose data rows are the values. So [{"id":1,"name":"Ada"}] becomes the two lines id,name and 1,Ada. Nested objects are flattened into dotted-path columns (a.b) so nothing is lost, and the whole conversion happens in your browser — your data is never uploaded.

How are commas and quotes inside values handled?

Per RFC 4180 (the CSV specification). Any field that contains the delimiter (a comma), a double-quote character, or a line break is wrapped in double-quotes, and any double-quote inside such a field is escaped by doubling it — so a value like Ada, "the" Countess is emitted as "Ada, ""the"" Countess". Fields with no special characters are written unquoted. This is exactly how Excel and RFC-4180-compliant parsers expect CSV to be quoted.

What happens to nested JSON objects?

CSV is flat, so nested objects are flattened into dotted-path column names rather than dropped. {"user":{"id":1,"name":"Ada"}} becomes the columns user.id and user.name. This keeps every leaf value addressable in a single row and avoids the silent data loss you get from tools that only read top-level keys. Arrays and other non-object leaves are serialized into the cell as-is.

Related Data-Format Converter (JSON ↔ CSV / YAML / XML) pages