Skip to content
Data & Document Tools

JSON to CSV Converter

Flatten a JSON array of objects into a CSV file that opens cleanly in Excel, Sheets or Numbers.

Drag & drop your file here, or browse

Accepted: .json,application/json — Output: .csv

Everything runs locally in this browser tab. Nothing is uploaded to any server.

How to use this tool

StepWhat to doDetails
1Add one JSON fileThe file should contain an array of objects (or a single object).
2Click "Convert to CSV"Object keys become column headers automatically, including nested keys flattened with a dot.
3DownloadSave the .csv file, ready to open in a spreadsheet app.

This is the mirror image of the more familiar CSV-to-JSON problem, and it comes up just as often. Data comes back from an API, a database export, or a webhook as JSON — nested, bracketed, full of curly braces — and the person who actually needs to look at it doesn’t write code and has no interest in learning to read JSON. They want to open a file in Excel or Google Sheets, sort a column, maybe build a quick pivot table, and move on with their day. Handing them a .json file is a non-starter. This tool takes that JSON and turns it into a plain CSV that opens the way any spreadsheet file should.

The interesting part isn’t the basic conversion — turning a flat list of simple objects into rows and columns is straightforward. It’s what happens when the JSON isn’t flat, which, in practice, is most of the time. Real-world JSON nests things: a customer record might have a top-level name and email, but the address lives in its own nested object with city, state, and zip underneath it. A spreadsheet has no concept of “an object inside a cell,” so something has to give.

What flattening actually means

The way this tool handles it is called flattening, and the idea is simpler than it sounds: instead of trying to cram a nested object into one cell, it walks down into the structure and builds a column name out of the path it took to get there, joined with dots. That nested address object becomes three separate columns — address.city, address.state, address.zip — each with its own value, sitting right there in the row alongside name and email. It’s not elegant in the way a database schema is elegant, but it’s exactly the kind of column naming a spreadsheet person can look at and immediately understand, and it means no data quietly disappears just because it happened to be nested a level deep.

Arrays inside an object are handled differently, and it’s worth knowing the difference before you convert something important. If a record has a field like tags containing a list of values, that list doesn’t get exploded into multiple rows or multiple columns — it gets written into a single cell as a JSON-formatted string, brackets and all. That’s the only sane default when you don’t know in advance how many items might be in the list, but it does mean that column will look a little different from the others, and you may want to clean it up by hand afterward if you need the individual list items broken out separately.

A few things worth knowing before you convert

The source file needs to be either an array of objects — the shape you get from most API endpoints and export tools — or a single object on its own, which gets automatically treated as a one-row file rather than rejected. If the records in your array don’t all share exactly the same fields, that’s fine too: the tool looks at every record, collects the full set of column names that shows up anywhere in the file, and fills in a blank cell for any record that’s missing a particular field rather than throwing an error or dropping rows. That matters more than it sounds like it should, because real JSON exports are rarely perfectly uniform — a handful of records might have an optional field the rest don’t.

The output itself is comma-separated, with values properly quoted whenever they contain a comma, a quote character, or a line break, so the resulting file opens cleanly rather than shifting columns sideways the moment a text field has a comma in it. And if the file you upload isn’t actually valid JSON — a trailing comma, a missing bracket, the kind of thing that’s easy to introduce when hand-editing an export — you’ll get a clear error telling you the syntax is broken rather than a silently malformed result.

It’s also worth glancing at the header row once the CSV comes out, especially on a deeply nested source file. Dot-notation column names like shipping.address.city are perfectly valid and will sort and filter fine in Excel or Sheets, but they can run long if the original JSON was nested three or four levels deep. Widening a column or two, or renaming a header for a presentation copy, is a two-second fix once you can see the data laid out — it’s just not something worth automating away, since a human deciding what to call a column tends to do a better job than a guess baked into the conversion itself.

Who ends up needing this

A support or operations team pulling a customer or ticket export from a SaaS tool’s API often gets JSON back and needs to hand a readable version to a manager who lives in spreadsheets. A developer testing an endpoint might want to eyeball a batch of sample responses in a grid rather than scrolling through raw text. And anyone doing a one-off data cleanup — checking a JSON export from a form builder or a survey tool for duplicates or gaps — usually finds it faster to spot problems in rows and columns than in nested braces.

Because the whole process runs locally in your browser rather than on a remote server, it’s also a reasonable way to handle exports that include names, emails, or other information you’d rather not upload anywhere just to reformat. The file goes in, the CSV comes out, and nothing leaves your machine in between.