🧾 JSON to CSV Converter

Paste a JSON array of objects and get clean CSV output instantly. Free browser-based JSON to CSV converter β€” no upload, works offline.

Working with APIs, configuration files, or exports that come as JSON, but need the data in a CSV table? Our JSON to CSV Converter turns a JSON array of objects into clean, well-formed CSV in one click β€” entirely in your browser, with nothing uploaded anywhere.

JSON is everywhere: REST API responses, webhook payloads, database exports, and settings dumps. But when you need to open that data in a spreadsheet, run it through a data-analysis tool, or import it into a CRM or email platform, CSV is usually the format those tools want. This converter bridges that gap: paste your JSON, get CSV with a header row built from the object keys and one row per object.

The tool flattens simple key-value objects into columns and automatically handles nested values by stringifying them, so you never lose data β€” a nested object or array simply becomes a compact JSON string inside its cell. Column order follows the first object that defines each key, which matches how most APIs structure their responses.

Typical uses include converting API output to a table for reporting, preparing JSON test data for spreadsheet review, moving user or product records between systems, and quickly inspecting large JSON payloads without writing a script. Because it runs locally, even sensitive payloads stay on your machine.

How the Conversion Works

At its core, the converter runs a single JSON.parse() call on your input and then walks the resulting structure to build rows. Before anything is written, the tool verifies that the parsed value is a JSON array of objects. If you paste a bare object ({"a":1}), a string, a number, or an array of arrays, it stops and asks you for an array of objects instead β€” because only that shape has clear keys you can turn into a header row.

Once the input is validated, the header line is assembled from the keys of the first object, in exactly the order they appear in that object. Each subsequent row is built by looking up the same keys in every object, so the columns stay aligned across the whole table even when different objects define keys in different orders or omit some of them.

Every value then becomes one cell. Numbers, booleans, and plain text are written as-is. Anything that contains a comma, a double quote, or a line break is wrapped in double quotes, and any internal double quote is doubled ("") so it cannot be confused with the quoting itself β€” this follows the RFC 4180 escaping rules that Excel, Google Sheets, and most CSV importers expect. A tiny worked example makes this concrete:

Input :  [{"name":"Smith, John","city":"Amsterdam","score":9}]
Output:  name,city,score
         "Smith, John",Amsterdam,9

Note how Smith, John is quoted because of its comma, while Amsterdam and 9 are left untouched. That one rule β€” quote anything that could break the column structure β€” is what keeps the output valid for any downstream tool.

Worked Examples

Here are two examples with real, hand-verified data so you can see exactly what to expect.

Example 1 β€” simple records with a quoted field. Paste this order export:

[{"order_id":1024,"customer":"J. Smith","city":"Rotterdam","total":49.90}]

The first object defines four keys in this order β€” order_id, customer, city, total β€” so those become the header. The J. Smith value contains a comma, so that cell is quoted. The output is:

order_id,customer,city,total
1024,"J. Smith",Rotterdam,49.90

Example 2 β€” uneven keys with a missing field. Objects in a real dataset are not always identical. Consider this list of engineers:

[{"id":1,"name":"Ada"},{"id":2,"name":"Grace","role":"pioneer"}]

The columns follow the first object: id, name, role. The first row has no role, so that cell is simply left empty. The result stays aligned:

id,name,role
1,Ada,
2,Grace,pioneer

This is the key behaviour that keeps your table intact when later records carry extra fields β€” nothing shifts columns, and absent values become clean empty cells rather than errors.

Edge Cases & Limitations

A handful of situations are worth knowing about before you convert. Nested objects or arrays (a value that is itself a JSON object, such as an address or a tags list) are not flattened into extra columns β€” instead they are stringified into a compact JSON string inside the cell. No data is lost; the full nested value is visible in the spreadsheet, and you can split it out later if you need separate columns. null and undefined values become empty cells, matching the way empty fields behave in CSV.

Cells with a newline or a quote are quoted correctly, including doubling embedded quotes, so a multi-line address or a value like He said "hi" survives the round-trip intact. Large arrays β€” tens of thousands of rows β€” are processed locally in your browser with no upload and no server-side cap, so the only practical limit is your device's memory. UTF-8 characters such as cafΓ©, Straße, or 東京 are preserved exactly, because the conversion works on JavaScript strings rather than mangling bytes.

Frequently Asked Questions

What JSON format does this converter accept?

It accepts a JSON array of objects, like the output of most APIs: [{"name":"Alice","age":30},{"name":"Bob","age":25}]. The object keys become the CSV header row, and each object becomes one data row. A single JSON object or a nested array-only structure won't produce meaningful CSV.

How are nested objects and arrays handled?

Nested values are kept safe by converting them to a compact JSON string inside the cell (for example, an address object becomes {"city":"Amsterdam"}). This means no data is lost, and you can still see the full value in the spreadsheet cell before splitting it out if needed.

What happens if a row is missing some keys?

Missing keys become empty cells, and the column order stays consistent across all rows. The header is built from the first object that defines each key, matching how most APIs return their data, so the table stays aligned even when objects differ slightly.

Is my JSON data uploaded to a server?

No. Parsing and conversion run entirely in your browser with JavaScript β€” nothing is sent anywhere. This makes the tool safe for confidential API responses, customer records, or any data you don't want to share with a third-party service.

Can I convert a single JSON object instead of an array?

No. The converter expects an array of objects, because a single object has no concept of rows. If you paste one object, you will see a message explaining the expected format. If your source returns a single object, wrap it in square brackets β€” [{...}] β€” to turn it into a one-row table with the object's keys as the header.

Why are my nested values shown as JSON strings in the cells?

Because flattening a nested structure into separate columns would require inventing column names like address.city, which can collide or become ambiguous. Stringifying the nested object keeps the full value intact in one cell. You can then use a spreadsheet formula or a JSON tool to split it out if you need the fields individually.

How does the tool decide the order of the columns?

Columns follow the order in which keys first appear across the array, starting from the first object. This matches how most APIs order their fields, so your CSV usually comes out in a sensible, predictable order. If an object later in the array introduces a new key, that key is added as a new column to the right.

What happens to null or missing values?

Both null and missing keys become empty cells, keeping every row at the same width. That keeps the table aligned and import-friendly. If a value is an empty string, it is kept as an empty cell too, which is the expected behavior for most data pipelines.

Can I convert huge JSON files?

Yes, within the practical limits of your browser's memory. Because everything runs locally, there is no upload size limit and no server bottleneck. For typical API responses β€” from a few dozen to several thousand objects β€” conversion is effectively instant.

What is the difference between this and the Excel to CSV tool?

This tool takes JSON that you paste and builds a CSV table from object keys. The Excel to CSV tool takes tab-separated text copied from a spreadsheet and normalizes it into CSV. Use the JSON one when your source is an API, database export, or configuration file; use the Excel one when your source is already a spreadsheet selection.

About the Author

This converter is built and maintained by Aren Breur, the creator of ConvertAny.app. Aren specializes in privacy-first web tools that process your data entirely in the browser, so nothing is ever uploaded. Questions or feedback? Reach out at aren2connect@gmail.com.