RunToolRunRunToolRun
Tools/Code & Developer/JSON to CSV

JSON to CSV

Convert JSON files to CSV format.

100% on device ยท 0 uploads
๐ŸŽ Privacy Guarantee: Your data is completely processed in your browser and never saved to any server. You can safely convert customer data.
01 ยท Unlimited
Use it as many times as you want โ€” completely free.
02 ยท Private
Your files never leave your device; everything runs in your browser.
03 ยท Fast
Processing happens locally and finishes in seconds.

How to Convert JSON to CSV

1

Paste your JSON array

Drop or paste an array of objects โ€” the typical shape of API responses and exports.

2

Flattening runs locally

Object keys become column headers and each object becomes a row, right in your browser.

3

Download the CSV

Open the result in Excel or import it anywhere CSV is accepted.

Flattening a tree into a grid

JSON is hierarchical and CSV is a flat table. Every conversion is therefore a decision about how to represent nesting in a structure that has none. A nested object usually becomes columns joined by dots โ€” `address.city`, `address.postcode` โ€” which works well and is easy to read back.

Arrays are harder, because there is no obvious column count. An order with three items can become three columns, one column containing a joined string, or three rows repeating the order details. All three are used, and which is right depends entirely on what you plan to do with the file.

Records that do not share the same shape

A CSV needs one header row that covers every record. If the objects have different keys โ€” because a field is optional, or the data evolved over time โ€” the header must be the union of all keys, and every record without a given key leaves that cell empty.

An empty cell is ambiguous in a way JSON is not: it could mean the key was absent, present but null, or present with an empty string. CSV cannot distinguish these, and that information is gone once converted.

What CSV cannot carry

Types are the main loss. Numbers, booleans and nulls all become text, and the distinction between the number 1 and the string '1' disappears. Anything reading the CSV afterwards has to guess the types back, and it will guess wrong on identifiers with leading zeros and on very long numbers.

Deeply nested structures also stop being useful long before they stop being possible. Three or four levels of nesting produce column names nobody can read and a file nobody can work with. At that depth, a spreadsheet is the wrong destination.

Escaping, or how spreadsheets get broken

Any value containing the separator, a quotation mark or a line break must be quoted and escaped. A single unescaped comma inside a description field shifts every subsequent column in that row, and the file still opens โ€” it is simply wrong from that row onwards.

This is worth checking specifically, because it is the failure that survives a casual glance. Open the result and look at a row containing free text, not just the first three rows.

When to convert at all

The good reasons are all about the destination: someone needs to open it in a spreadsheet, a system only ingests CSV, or a non-technical colleague needs to read it. If the consumer can handle JSON, keeping the structure is almost always better.

Conversion happens in your browser, so API exports and internal records are not uploaded. That matters here more than usual, since JSON exports frequently contain tokens and personal data that people forget are in the file.

Written by Mutaf โ€” Developer of RunToolRun. This section is written from the tool's own implementation.

Why Use This JSON to CSV Converter?

โœ“API responses become Excel-friendly tables
โœ“Handles mixed keys across objects
โœ“Quoted and escaped output per CSV standard
โœ“100% local โ€” API data stays private

Frequently Asked Questions

What JSON shape is expected?+
An array of objects like [{"name":"Ann","age":30}, โ€ฆ]. Keys become the header row; each object's values fill one row.
What happens with nested objects?+
Nested values are serialized into their cell as JSON text. For deeply nested data, consider restructuring in code first โ€” CSV is inherently flat.
Do all objects need the same keys?+
No โ€” the converter collects the union of all keys and leaves cells blank where an object lacks a value.
Why convert JSON to CSV?+
To open API data in Excel, hand it to non-technical colleagues, or import it into tools that only accept spreadsheets.

Related Tools