JSON to CSV Converter

Convert JSON into CSV or TSV right in your browser. Arrays of objects become rows with a header, nested objects can be flattened into dot-named columns, and fields are quoted per RFC 4180, with an optional UTF-8 BOM so Excel opens accented and non-Latin text correctly.

CSV output

Paste JSON or open a .json file to see the CSV here.

Usage examples

Opening an API response in a spreadsheet

Paste a response such as {"data": [...], "page": 1}. When an object holds exactly one array of records, that array is used automatically, so you get one CSV row per record without editing the JSON first.

Sharing database query results with non-developers

Export documents or query results as a JSON array, convert them here, and send the CSV to colleagues who work in Excel or Google Sheets. Columns follow the order in which keys first appear.

Splitting nested address objects into columns

With 'Flatten nested objects' on, {"address": {"city": "Seoul", "zip": "04524"}} becomes the columns address.city and address.zip, which is what a mail merge or a CRM import usually expects.

Preparing a file for Excel in Germany or France

Excel in locales that use a decimal comma separates CSV columns with semicolons. Choose the semicolon delimiter and tick the BOM option so the file opens in separate columns with accented characters intact.

Turning Google Sheets API values back into CSV

The Sheets API returns cell data as {"values": [[...], [...]]}. Paste the whole response: the array of arrays is detected and written row by row, without adding a header of its own.

Quick reference

How JSON values are written into CSV cells

JSONCSV — Flatten nested objects: ONOFF
"text"v\r\ntextv\r\ntext
"Smith, John"v\r\n"Smith, John"v\r\n"Smith, John"
"He said \"hi\""v\r\n"He said ""hi"""v\r\n"He said ""hi"""
"line1\nline2"v\r\n"line1\nline2"v\r\n"line1\nline2"
42v\r\n42v\r\n42
1.5e3v\r\n1500v\r\n1500
truev\r\ntruev\r\ntrue
nullv\r\nv\r\n
["a", "b"]v\r\n"[""a"",""b""]"v\r\n"[""a"",""b""]"
{"city": "Seoul", "zip": "04524"}v.city,v.zip\r\nSeoul,04524v\r\n"{""city"":""Seoul"",""zip"":""04524""}"
{}v\r\n{}v\r\n{}

JSON structures and the CSV they produce (default options)

JSONCSV
[{"name": "Anna", "age": 30}, {"name": "Ben", "city": "Busan"}]name,age,city\r\nAnna,30,\r\nBen,,Busan
{"data": [{"id": 1}, {"id": 2}], "page": 1}id\r\n1\r\n2
{"range": "A1:B2", "values": [["a", "b"], ["1", "2"]]}a,b\r\n1,2
{"id": 7, "ok": true}id,ok\r\n7,true
[[1, "a"], [2, "b"]]1,a\r\n2,b
["red", "green"]value\r\nred\r\ngreen

Frequently asked questions

Is my JSON uploaded anywhere?

No. The conversion runs entirely in your browser, and opening a file only reads it locally. Your input and options are kept in this browser's local storage so they survive a reload; click Clear to remove the input.

Which JSON structures can be converted?

An array of objects (one row per object), an array of arrays (written row by row as-is), an array of plain values (a single 'value' column), and a single object (one row). If the top level is an object containing exactly one array of objects or arrays, such as {"data": [...]}, that array is used and its key is shown above the output.

How are nested objects and arrays handled?

With flattening on, nested objects become dot-separated columns, so {"a": {"b": 1}} gives a column named a.b. Arrays are written into a single cell as JSON text (for example ["x","y"]) because they can have any length. With flattening off, every object or array value is written as JSON text in one cell.

What if my objects don't all have the same keys?

The columns are the union of all keys, in the order they first appear. A record that lacks a key gets an empty cell in that column. Note that null is also written as an empty cell, so CSV can't distinguish a null value from a missing key.

How are commas, quotes, and line breaks escaped?

Following RFC 4180, any field that contains the delimiter, a double quote, or a line break is wrapped in double quotes, and each double quote inside it is doubled (""). Records are separated with CRLF line endings, as the RFC specifies. Fields without special characters are left unquoted.

Why do accented or Korean characters look garbled in Excel?

The CSV is UTF-8. Excel can open a UTF-8 CSV without a byte order mark (BOM) in the system's legacy encoding, which garbles non-ASCII text. Tick 'Add UTF-8 BOM' before downloading; the invisible BOM tells Excel to read the file as UTF-8. Leave it off for programs that don't expect one.

Which delimiter should I choose?

Comma is the standard and works with most tools. Use semicolon for Excel in locales where the comma is the decimal separator (much of Europe and Latin America), because Excel splits columns on the system list separator there. Tab produces a TSV file, which is handy for pasting into spreadsheets and is downloaded with a .tsv extension.

Why do some cells start with an apostrophe (')?

Excel, Google Sheets and LibreOffice can execute a cell that starts with =, +, -, @ (or a tab or carriage return) as a formula, so untrusted data could open links or run external commands when the file is opened (CSV formula injection). With "Protect against formula injection" on (the default), such text cells get a leading apostrophe so spreadsheets show them as plain text. Values that are numbers on their own, like "-5", and JSON numbers and booleans are left unchanged. If the CSV will be read by a program rather than a spreadsheet, you can turn the option off.