JSON to CSV — Convert JSON Arrays to CSV Online

🔒 Runs in your browser — nothing is sent to a server

JSON to CSV converts any array of objects into a properly formatted CSV file ready for Excel, Google Sheets, BigQuery COPY, Postgres `\copy` or any data-warehouse import. Paste an API response, a fixture file, a database query result or a hand-written JSON blob, pick the delimiter your target tool expects (comma, semicolon, tab or pipe), and the converter infers the column headers from the object keys, escapes commas and quotes inside values, and emits RFC 4180-compliant CSV. Force-quote every cell when shipping into a locale where comma is the decimal separator. Everything runs 100% inside your browser; your JSON never leaves your device, nothing is uploaded, logged or sent to any server.

Two-pane view: input and output side by side
Copied!

When to use a JSON to CSV converter online

You reach for a JSON to CSV converter any time JSON-shaped data needs to flow into a spreadsheet, a database or a BI tool: prepping an API response for review in Excel, generating a CSV fixture for a `COPY orders FROM` Postgres script, exporting a query result from a NoSQL store into Google Sheets, handing off a webhook payload to a non-engineer for inspection, or seeding a Looker / Metabase dashboard with sample data. Browser-local conversion matters when the JSON contains customer emails, payroll rows, internal report definitions or any data you would rather not paste into a remote SaaS converter.

How JSON to CSV conversion works under the hood

JSON to CSV conversion is a parse-then-emit pipeline. The browser native `JSON.parse` validates the input and produces an in-memory JavaScript array of objects; any syntax error surfaces immediately with a clear message and a position. The Papa Parse `unparse` function then walks the array, builds the header row from the first object's keys, and writes one CSV row per object — escaping commas, quotes and line breaks per RFC 4180, applying the delimiter you chose, and force-quoting every cell when that option is on. The result is ready to paste into Excel, drop into a `COPY` script or upload to a data warehouse. The whole pipeline runs inside your browser engine in milliseconds, even on multi-thousand-row arrays.

Examples

Input
[{"name":"Alice","age":30,"active":true},{"name":"Bob","age":25,"active":false}]
Output
name,age,active
Alice,30,true
Bob,25,false
JSON to CSV — typical API response with mixed types
Input
[{"sku":"FC-001","product":"Widget","price_eur":9.99},{"sku":"FC-002","product":"Gadget","price_eur":24.50}]
Output
sku;product;price_eur
FC-001;Widget;9.99
FC-002;Gadget;24.5
Convert JSON to CSV — semicolon-delimited for European Excel
Input
[{"tool":"json to csv","useCase":"export json as csv"},{"tool":"json csv converter","useCase":"flatten array of objects for excel"}]
Output
tool,useCase
json to csv,export json as csv
json csv converter,flatten array of objects for excel
JSON array to CSV — payload that names the tool itself
Input
[{"id":1,"address":"123 Main St, Apt 4","note":"first order"},{"id":2,"address":"55 King St","note":"contains, comma"}]
Output
id,address,note
1,"123 Main St, Apt 4",first order
2,55 King St,"contains, comma"
Export JSON as CSV — quoted values with embedded commas escaped

FAQ

How do I convert a JSON array to CSV?

Paste the JSON array of objects into the input above and click Convert to CSV. The converter parses the JSON, infers the column headers from the union of object keys, writes one CSV row per object, and escapes any commas, quotes or line breaks inside values. The output is RFC 4180-compliant CSV ready for Excel, Google Sheets or a database COPY/IMPORT command.

What JSON format is supported?

The input must be a JSON array of objects where each object represents one row — for example `[{"name":"Alice","age":30},{"name":"Bob","age":25}]`. Object keys become the CSV column headers. Objects with missing keys produce empty cells in those columns. Nested objects and arrays are stringified into the cell unless you flatten them first with `jq` or a small JavaScript transform.

Which delimiter should I pick?

Comma (default) for US/UK Excel, Postgres COPY, BigQuery LOAD and most ETL pipelines. Semicolon for European Excel where comma is already the decimal separator (de_DE, fr_FR, es_ES locales). Tab for spreadsheet pastes (Excel, Google Sheets and Numbers all auto-detect tab-separated values). Pipe for legacy mainframe imports and a few BI tools that historically chose `|` to sidestep CSV escaping.

How does the JSON to CSV converter handle quotes and embedded commas?

Per RFC 4180, any value containing the delimiter, a double quote or a line break is wrapped in double quotes, and any inner double quote is escaped as `""`. The converter applies this rule automatically — you can paste an address like `"123 Main St, Apt 4"` and the comma is preserved as part of the cell, not treated as a column boundary. Force-quote mode wraps every cell, useful for Excel imports in tricky locales.

Why are some columns missing in my CSV output?

The header row is inferred from the keys of the first object. If later objects have keys that the first one is missing, those keys are dropped from the output. Normalise the array first — either give every object the same shape (`null`-fill missing keys) or compute a union of keys across all objects with a small transform — to keep every column.

How is JSON to CSV different from CSV to JSON?

JSON to CSV and CSV to JSON are inverse operations. JSON to CSV flattens an array of objects into rows for Excel, Google Sheets or a database COPY/IMPORT. CSV to JSON parses a row-oriented spreadsheet back into a JSON array of objects for API calls and JavaScript consumption. Both round-trip cleanly when the JSON is a flat array of objects with no nested fields.

Can I convert nested JSON to CSV?

Not directly — CSV is a flat row-and-column format with no concept of nesting. The converter handles flat arrays of objects; nested objects and arrays are stringified into the cell as JSON. To get a clean nested-to-flat mapping, normalise the JSON first with `jq` (`map({a, b: .nested.b})`), a SQL `JSON_VALUE`/`json_extract` query, or a small JavaScript transform that picks the leaf fields you want as columns.

Is it safe to paste a JSON with sensitive data into this online JSON to CSV converter?

Yes — the JSON to CSV converter runs entirely in your browser via the Papa Parse library bundled into the page. Your JSON and the CSV output stay on your machine; nothing is uploaded, logged or cached. Safe for customer exports, payroll dumps, internal admin reports and any data you would not want a remote SaaS converter to retain.

Glossary

JSON (JavaScript Object Notation)

JSON is a lightweight, text-based data format that represents structured data as nested objects, arrays, strings, numbers, booleans and null. Defined by RFC 8259 and ECMA-404, JSON is the de-facto wire format for HTTP APIs, configuration files, package manifests and IPC. Converting JSON to CSV flattens a JSON array of objects into the row-and-column shape that spreadsheets expect.

CSV (Comma-Separated Values)

CSV is a simple text format where each line is a row and each row holds fields separated by a delimiter — usually a comma, sometimes a semicolon (European locale) or tab. Defined informally for decades and loosely standardised by RFC 4180. CSV is the lingua franca for tabular data exchange between spreadsheets, databases, BI tools and ETL pipelines.

CSV header row

The header row is the first line of a CSV file and lists the column names — for example `name,age,active`. JSON to CSV infers the header from the keys of the first object in the array, then writes one data row per remaining object. The header row can be turned off if the target system already knows the schema and expects only data rows.

Delimiter

The delimiter is the character that separates fields within a CSV row. Comma is the default in US/UK locales; semicolon is standard in European locales (because comma is the decimal separator); tab and pipe appear in machine-generated exports. Pick the right delimiter for the target system — Excel honours the locale, BigQuery and Postgres COPY accept any single character.

RFC 4180

RFC 4180 is the IETF informational standard that codifies CSV. It defines the row terminator (`\r\n`), the field separator (comma by default), the double-quote rule for fields containing commas, line breaks or quotes, and the `""` escape for an inner double quote. Modern CSV parsers (Papa Parse, Python `csv`, .NET `CsvHelper`) implement RFC 4180 so files round-trip cleanly between languages.

Papa Parse

Papa Parse is the de-facto JavaScript CSV library — streaming, RFC 4180-compliant, with header detection, dynamic typing, custom delimiters and worker-thread support. The matching `Papa.unparse` writes JSON arrays back to CSV with the same fidelity. Browser-local Papa Parse means the data never leaves the page, which matters for spreadsheets containing customer or payroll information.

Related tools