JSON to CSV Converter
Convert a JSON array of objects to CSV. Flatten nested objects and arrays into their own columns, choose a delimiter, and keep it all in your browser.
- Free, no account
- No watermark
- No usage limit
About the JSON to CSV Converter
You pulled a JSON array off an API or a database export, and now a colleague needs it as a spreadsheet. The catch is that real API data is almost never a flat list. Each record has an address object tucked inside it, a list of tags, maybe an order with line items. Paste that into most free converters and the nested part gets dumped into one cell as raw text like {"city":"London","zip":"EC1"}, which is close to useless once it lands in Excel. Here the structure gets flattened out into columns instead. A nested object spreads across address.city and address.zip, while a list becomes roles.0, roles.1 and so on down. Every value lands in a real column you can sort and filter. It all runs in your browser, so nothing you paste is uploaded or logged, and the CSV rebuilds the moment you paste.
JSON is what the API gives you. CSV is what Excel, Google Sheets, pandas, and almost every import tool actually read, so at some point the two have to meet. Doing it by hand is slow and easy to botch. Keys differ between records and have to be reconciled, any value holding a comma or a line break needs wrapping in quotes, and quotes already inside a value have to be doubled. Miss one of those and a stray comma shoves every later column out of place, so the file opens crooked. The tool follows the standard RFC 4180 quoting rules for you and keeps the rows aligned even when the records are shaped differently.
How to use
- Paste your JSON, drop a
.jsonfile onto the input box, or click to choose one. It expects an array of objects, and it also reads a wrapped array like{"data":[ ... ]}. - Leave Flatten to columns on to spread nested fields into their own columns, or switch to Keep as JSON to pack each nested value into one cell.
- Pick a delimiter. Comma is the standard, semicolon suits locales where the comma is a decimal mark, and tab gives you TSV that pastes straight into a grid.
- Keep the header row on for column names, or turn it off for data rows only.
- Copy the result or download a
data.csvfile. The output updates live as you edit, so there is no convert button to press.
If the input is not valid JSON or cannot map to rows, the output box stays empty and a short message tells you exactly what is wrong so you can fix it and carry on.
Flatten nested JSON into real columns
Flattening is the part that sets this apart from a basic converter, so it is on by default. When a value is itself an object, the tool walks into it and builds a dotted path for each field. When a value is a list, each item gets an indexed path. It goes as deep as your data does, so a customer with an address that holds a geo object ends up with a column like address.geo.lat.
Say an API hands you two records with a nested address and a list of roles:
[
{"id": 1, "name": "Ada", "address": {"city": "London", "zip": "EC1"}, "roles": ["math", "computing"]},
{"id": 2, "name": "Grace", "address": {"city": "New York", "zip": "10001"}, "roles": ["navy"]}
]
Leave Flatten on and it comes out like this:
id,name,address.city,address.zip,roles.0,roles.1
1,Ada,London,EC1,math,computing
2,Grace,New York,10001,navy,
Every distinct path becomes a column, gathered from across all the records. Ada has two roles so both roles.0 and roles.1 show up. Grace has one, so her roles.1 cell is left blank and the columns still line up. Open that in a spreadsheet and you can sort by address.city or filter on a role, that was impossible while the whole address sat crammed in a single cell.
There is one honest limit here. Lists that vary a lot in length spread into as many indexed columns as the longest one, so a record carrying a fifty-item list drags fifty columns across the whole file. If that describes your data, the next mode is the better route.
Keep nested values as JSON when that fits better
Switch the toggle to Keep as JSON and nested objects and lists stay whole, written as compact JSON inside a single cell, for example {"city":"London"} or ["a","b"]. That is the right call in a couple of situations. If a field is a long free-form list you would rather keep together than explode into columns, one intact cell is cleaner. And if you plan to read the CSV back into code later and reparse that field, a single JSON string per cell is far easier to work with than reassembling forty scattered columns. The value is quoted and escaped like any other field, so it survives the trip whole.
Headers, delimiters, and uneven records
The header is the union of every key the tool sees, in the order the keys first appear, so records with different fields still fall under one consistent set of columns. A record missing a field gets an empty cell there rather than a shifted row, and the columns stay put no matter how ragged the input is.
Comma is the default and opens in most tools. Pick semicolon if your spreadsheet treats the comma as a decimal mark, which otherwise splits numbers in the wrong place. Tab produces TSV, handy when your data is full of commas and you want to paste it straight into a grid. Any value that contains your delimiter, a quote, or a line break is wrapped in quotes automatically, and quotes inside a value are doubled, so a product note like He said "hi" stays in one piece.
Because all of this happens in your browser, the JSON never leaves your machine. That matters when the data is not really yours to upload, like customer records or an internal export. There is no account and no upload step, and the tool keeps working even if you lose your connection once the page has loaded.
Frequently asked questions
Will numbers and leading zeros survive the conversion?
CSV stores everything as text, with no data types attached. Most spreadsheets re-detect numbers and dates when they open the file, which is usually what you want. The exception is anything with a meaningful leading zero, like a ZIP code of 02118 or a long product ID, since the spreadsheet can strip the zero and treat it as a plain number. When that matters, import through your spreadsheet's text-import option and set those columns to text before the data loads.
Why do accented characters look wrong when I open the CSV in Excel?
The file is saved as UTF-8, which Google Sheets, Numbers, and current tools read correctly. Some versions of Excel guess the encoding on a plain double-click and can mangle accented letters or non-Latin scripts. Open Excel first, then use Data, Get Data, From Text/CSV, and choose UTF-8 as the file origin. That loads the same file with the characters intact.
How deep does the flattening go?
As deep as the data. Each level of nesting adds another segment to the path, so an object three levels down comes out as something like billing.address.country. There is no fixed depth cap. The only real ceiling is that very deep, irregular data produces a lot of columns, and at that point Keep as JSON often reads better.
What happens when records have lists of different lengths?
The longest list in the whole set decides how many indexed columns exist. A record with three tags fills tags.0 through tags.2, and a record with one tag fills tags.0 and leaves the rest blank. Nothing is dropped and no row shifts, though a single very long list will widen every row in the file.
Can I keep a nested field together instead of splitting it?
Yes. Flip the Nested data toggle to Keep as JSON and every object or list is written as one compact JSON string in a single cell. Reach for it when a field is more useful whole than spread across columns, or when you plan to parse the CSV again later.
It said it read from the "data" array. What does that mean?
Plenty of APIs wrap the real records in an envelope, like {"data":[ ... ]} or {"results":[ ... ]}. Rather than reject that, the tool looks inside the object, finds the first property holding an array of records, and converts that. The note tells you which key it used so you can confirm it grabbed the right list.
Is there a limit on how much I can convert?
There is no server cap, because the work happens on your own device. Small and medium files convert instantly. A very large array of many thousands of records still works, it just uses more of your device's memory and takes a moment longer, since everything is processed locally.
How is this different from Excel's Get Data or Power Query?
Power Query can import JSON too, and it wins when you need a repeatable pipeline that refreshes from the same source on a schedule. This tool is built for the quick one-off. You paste, you get flattened columns, and you copy or download, all without desktop Excel, a connector to configure, or expanding each nested record by hand. For a conversion you do once and move on, it is a lot less fiddly.