JSON to CSV Converter
Convert a JSON array of objects to CSV (or CSV back to JSON) in one click — handles nested values and quoting, all in your browser.
We use cookies and similar technologies to enhance your browsing experience, analyze site traffic, and personalize content and ads. By clicking "Accept", you consent to our use of cookies. Learn more in our Privacy Policy.
Convert a JSON array of objects to CSV (or CSV back to JSON) in one click — handles nested values and quoting, all in your browser.
This is a free converter that turns a JSON array of objects into CSV, and CSV back into JSON, directly in your browser. Paste your data, pick a direction, and get clean output you can copy or download. It handles the parts people usually get wrong by hand: quoting fields that contain commas, escaping embedded quotes, and producing a stable column order so the result opens correctly in spreadsheet software.
It is built for the everyday task of moving data between an API response and a spreadsheet. JSON is what services return; CSV is what spreadsheets, BI tools, and many data pipelines expect. Doing the conversion by find-and-replace is error-prone, and pasting sensitive data into a random web service is a real concern. Here the conversion runs entirely on your device, so nothing you paste is uploaded or stored on a server. It works the same whether you have ten rows or several thousand.
Paste or type your data into the input box and choose the direction: JSON to CSV or CSV to JSON. The tool parses the input, builds the result, and shows it instantly so you can verify the output before copying.
For JSON to CSV, the input should be an array of objects, like [{"id":1,"name":"Ada"},{"id":2,"name":"Linus"}]. The converter scans every object to collect the full set of keys, writes them as the header row, and fills missing values with empty cells so every row has the same number of columns.
For CSV to JSON, the first row is treated as the header and each following row becomes one object keyed by those headers. Quoted fields, escaped quotes (""), and values containing commas or line breaks are parsed correctly rather than split blindly on every comma.
Use the copy button for clipboard, or download to save a .csv or .json file. Everything happens locally in the page.
Say an API returns this:
[
{"id": 1, "name": "Ada Lovelace", "note": "first, programmer"},
{"id": 2, "name": "Grace Hopper", "note": "said \"bug\""}
]
Converting to CSV produces:
id,name,note
1,Ada Lovelace,"first, programmer"
2,Grace Hopper,"said ""bug"""
Notice two things the tool does for you. The note value first, programmer is wrapped in quotes because it contains a comma, so a spreadsheet keeps it in one cell instead of splitting it into two columns. The value said "bug" is wrapped in quotes and each inner quote is doubled to "", which is how CSV escapes quotation marks. Round-tripping that CSV back through CSV to JSON gives you the original objects again, including the comma and the quotes intact.
fetch or a tool like an HTTP client, get a CSV you can open in your spreadsheet app.{"a":1} should be wrapped as [{"a":1}]. A bare value or an array of arrays will not map cleanly to columns."address": {"city": "..."} is typically written as its JSON text inside one cell. If you need each nested field as its own column, flatten the JSON first (for example, turn address.city into a top-level key).CSV looks trivial until a value contains the very characters used to structure the file: the comma, the quote, and the newline. The widely followed convention (RFC 4180) handles this with two rules. First, any field that contains a comma, a double quote, or a line break must be enclosed in double quotes. Second, a double quote inside such a field is escaped by writing it twice.
That is why she said "hi" becomes "she said ""hi""" in the output. Skip these rules and a single comma in a description shifts every column after it, silently corrupting the row. A newline inside a quoted field is also valid and stays part of one cell.
This converter applies the rules in both directions, which is what makes the JSON to CSV to JSON round trip lossless for ordinary string data. When you read the output, the doubled quotes and wrapping quotes are not noise; they are the format working correctly.
An array of objects, such as `[{"id":1},{"id":2}]`. Each object becomes a row and its keys become columns. A single object should be wrapped in an array first.
A flat table has no column for nested data, so nested values are written as their JSON text inside a single cell. If you need them as separate columns, flatten the JSON before converting.
Every key found in any object becomes a column, and objects that lack a field get an empty cell. The output is always rectangular so it opens cleanly in a spreadsheet.
Yes. Fields containing commas, quotes, or line breaks are wrapped in double quotes, and inner quotes are doubled, following the standard CSV quoting rules in both directions.
For ordinary string data, yes. The main caveat is types: CSV has no notion of number vs string, so a value may come back as a number after a round trip unless you handle it downstream.
No. Parsing and conversion run entirely in your browser on your device. Nothing you paste is sent to or stored on a server.
Standard comma-separated values with a header row. The result opens directly in common spreadsheet applications without extra import settings.
There is no fixed cap. It comfortably handles small to large datasets; very large inputs are bound only by your browser's available memory since everything runs locally.