How to Convert JSON to CSV
JSON is how applications and APIs pass data around. CSV is how spreadsheets, finance teams, and data tools want to receive it. So the moment you need to open API output in Excel, hand a dataset to someone non-technical, or load records into a tool that only accepts spreadsheets, you need to turn that JSON into CSV — and doing it by hand is miserable.
This guide shows the fastest way to convert JSON to CSV, what to do when your data is nested rather than flat, and how to open the result cleanly in Excel or Google Sheets. If you just want it done now, paste your JSON into the free JSON to CSV converter — it runs entirely in your browser, so your data is never uploaded to a server.
What JSON converts cleanly into CSV
CSV is a flat, two-dimensional format: rows and columns, nothing more. JSON is hierarchical and can nest data many levels deep. The conversion works best when your JSON already looks like a table — specifically, an array of objects where every object has the same keys. Each object becomes a row; each key becomes a column.
This is the ideal shape:
[
{ "id": 1, "name": "Ada Lovelace", "role": "Engineer" },
{ "id": 2, "name": "Alan Turing", "role": "Mathematician" }
]
Which converts to:
id,name,role
1,Ada Lovelace,Engineer
2,Alan Turing,Mathematician
A single JSON object (not wrapped in an array) also works — the converter treats it as a one-row table. Anything more complex than this needs a quick flattening step first, covered below.
How to convert JSON to CSV (step by step)
- Open the JSON to CSV converter.
- Paste your JSON into the left panel, or click Upload File to load a
.jsonfile from your computer. - The CSV appears in the right panel instantly as you type or paste — there is no "convert" button to press.
- If your JSON is malformed, you'll see a clear "Invalid JSON input" message instead of output. Fix the syntax (a missing comma or bracket is the usual culprit) and it re-converts automatically.
- Click Copy to grab the CSV, or Download to save it as
converted.csv.
The conversion happens in your browser using a battle-tested CSV library that handles the fiddly parts for you — quoting values that contain commas, escaping quotation marks, and preserving line breaks inside fields. You don't have to think about any of it.
Dealing with nested JSON
Here's the honest catch most converters won't tell you: CSV has no concept of nesting. If a value in your JSON is itself an object or an array, it can't expand into neat columns automatically — there's nowhere for the sub-structure to go in a flat grid.
For example, this nested record:
[
{
"id": 1,
"name": "Ada Lovelace",
"address": { "city": "London", "country": "UK" }
}
]
The top-level fields (id, name) convert fine, but the nested address object won't break into separate city and country columns on its own. To get clean output, flatten the JSON first so every value is a simple string, number, or boolean:
[
{
"id": 1,
"name": "Ada Lovelace",
"address_city": "London",
"address_country": "UK"
}
]
The simplest way to flatten is to pull only the fields you actually need into a flat array before converting — most code that produces JSON can .map() each record into a flat object in a couple of lines. Run that JSON through the converter and every column lands cleanly.
Make sure every object has the same keys
Columns are determined from the keys of the first object in your array. If later objects introduce keys the first one didn't have, those extra columns can be left out; if an object is missing a key, that cell is simply left blank. For predictable output, give every object the same set of keys — even if some values are empty strings or null.
Quick checklist before converting:
- Top-level structure is an array
[ ... ](or a single object). - Every object has the same keys, in the same order ideally.
- All values are flat — strings, numbers, booleans, or null. No nested objects or arrays.
- The JSON is valid — run it through the JSON Formatter first if you're unsure; it will pinpoint syntax errors.
Open your CSV in Excel or Google Sheets
Once you've downloaded converted.csv:
- Google Sheets: File → Import → Upload → choose the CSV → "Replace spreadsheet" or "Insert new sheet." Sheets detects the columns automatically.
- Excel: Double-clicking usually works, but for reliable column splitting use Data → From Text/CSV → select the file → confirm the delimiter is a comma → Load.
- Encoding tip: the converter outputs UTF-8. If accented characters or symbols look garbled in Excel, use the Data → From Text/CSV import path and set the file origin to UTF-8 rather than double-clicking.
Why convert JSON to CSV in your browser
API responses and exported data often contain things you don't want sitting on a stranger's server — customer records, emails, internal IDs, financials. Many online converters upload your file to do the work, which means your data leaves your machine.
FileNaut's JSON to CSV converter does the conversion 100% in your browser. Nothing is uploaded, logged, or stored — you can disconnect from the internet after the page loads and it still works. Need the round trip? The CSV to JSON converter goes the other way, and the JSON Formatter cleans up and validates messy JSON before you convert. All three are free and run locally.
Frequently Asked Questions
How do I convert JSON to CSV for free? ▼
What format does my JSON need to be in? ▼
Can it handle nested JSON? ▼
address.city into a single address_city field — so each value is a simple string or number. Then the conversion is clean.Can I open the CSV in Excel? ▼
Is my data uploaded anywhere? ▼
Why is my CSV showing "[object Object]" in a cell? ▼
user_name instead of a nested user object) — then re-convert and the cell will hold a real value.What if I get an "Invalid JSON" error? ▼
Ready to try it?
Use the tool right now — free, no signup, no upload.