JSON to CSV

Flatten JSON arrays into CSV for spreadsheets.

Runs locallyYour input is processed in this tab. The editor blocks outgoing network requests.
JSON input

JSON to CSV turns an array of JSON records into rows and columns you can open in Excel, Google Sheets or a database import. Nested objects are flattened into dotted column names, and you choose how arrays are written. It is for exporting API data to a spreadsheet. Conversion runs in your browser; nothing is uploaded.

How to convert JSON to CSV

  1. Paste a JSON array of objects, drop a .json file, or press ⌘/Ctrl O. An object that wraps an array, such as {"results": [...]}, works too.
  2. Pick a Delimiter and decide how nested data is handled with Flatten nested objects and Arrays. Turn on Excel-friendly (BOM) if the file will be opened in Excel, and Neutralize formulas if the data comes from untrusted users.
  3. Use Download .csv (⌘/Ctrl S), check the columns with Preview as table, or copy the text with ⌥/Alt C.

Examples

Flat order records

An array of flat objects maps directly: keys become the header row and each object becomes one row.

JSON
[{"id":1,"customer":"Acme Ltd","total":249.5,"paid":true},{"id":2,"customer":"Globex","total":1200,"paid":false},{"id":3,"customer":"Initech","total":75.25,"paid":true}]

Result:

CSV
id,customer,total,paid
1,Acme Ltd,249.5,true
2,Globex,1200,false
3,Initech,75.25,true

Nested users, default settings

The address object is flattened into address.city and address.zip. The tags array is kept as JSON text inside one quoted cell.

JSON
[{"id":1,"name":"Asha","address":{"city":"Pune","zip":"411001"},"tags":["admin"]},{"id":2,"name":"Ben","address":{"city":"Austin","zip":"73301"},"tags":["editor","beta"]}]

Result:

CSV
id,name,address.city,address.zip,tags
1,Asha,Pune,411001,"[""admin""]"
2,Ben,Austin,73301,"[""editor"",""beta""]"

Arrays as index columns

The same input with Arrays set to Index columns. Each position gets its own column, and rows with fewer items leave the extra cells empty.

JSON
[{"id":1,"name":"Asha","address":{"city":"Pune","zip":"411001"},"tags":["admin"]},{"id":2,"name":"Ben","address":{"city":"Austin","zip":"73301"},"tags":["editor","beta"]}]

Result:

CSV
id,name,address.city,address.zip,tags.0,tags.1
1,Asha,Pune,411001,admin,
2,Ben,Austin,73301,editor,beta

Wrapped API response

A paginated response with the records under results. The converter finds the array and reports "Converted the "results" array (2 rows)." A key missing from one record becomes an empty cell.

JSON
{"page":1,"results":[{"id":"u1","email":"a@example.com"},{"id":"u2","email":"b@example.com","phone":"+91 98765 43210"}]}

Result:

CSV
id,email,phone
u1,a@example.com,
u2,b@example.com,+91 98765 43210

Options explained

  • Delimiter — the character written between values: comma, semicolon, tab or pipe; semicolon suits spreadsheets in locales that use a decimal comma.
  • Flatten nested objects — writes nested keys as dotted column names such as user.name; when off, each nested object or array is written as JSON text in a single cell.
  • Arrays — how arrays inside a record are written: Keep as JSON (["a","b"] in one cell), Index columns (tags.0, tags.1), or Join with ; (a;b in one cell).
  • Neutralize formulas — off by default. When on, a cell that starts with =, +, - or @ gets a leading apostrophe, so spreadsheets show it as text instead of running it as a formula; negative numbers such as -5 are left alone.
  • Excel-friendly (BOM) — adds a UTF-8 byte-order mark at the start of the file so Excel displays accented and non-Latin characters correctly.

Common JSON to CSV problems

Accents and symbols look garbled in Excel

Excel assumes a legacy encoding for CSV files without a byte-order mark, so é or ₹ turn into two odd characters. Turn on Excel-friendly (BOM) and download again.

Everything lands in one column

The spreadsheet expects a different separator. Many European locales use ; for CSV because , is the decimal mark. Switch Delimiter to Semicolon, or import the file with the delimiter chosen explicitly.

Too many columns

Index columns create one column per array position, and flattening creates one per nested key, so varied records can produce a very wide file. Switch Arrays to Keep as JSON or Join with ;, or turn off Flatten nested objects for deeply nested data.

Columns appear in an unexpected order

Columns follow the order in which keys are first seen across the records. If later records introduce new keys, those columns are added at the end. Reorder keys in the first record, or move columns after import.

"Input is a single object, written as one row"

The JSON is a single object with no array of records inside it. That is converted as one row. If you expected many rows, check that the records are in an array.

Formulas run when the file is opened

By default, values starting with =, +, - or @ are written as they are, and spreadsheet apps may treat them as formulas. If the data comes from untrusted users, turn on Neutralize formulas: =HYPERLINK(...) becomes '=HYPERLINK(...), negative numbers stay numbers, and a notice says how many cells were prefixed.

FAQ

Is it safe to convert customer data here?

Yes. The conversion runs in your browser inside an isolated frame that blocks network requests, so exported customer lists and order data never leave your device, and nothing is stored on a server. Settings are remembered on this device; the input is only kept if you turn on "Remember my last input".

How do I convert JSON to Excel?

Convert to CSV here with Excel-friendly (BOM) on, then download the .csv file and open it in Excel. Excel reads CSV directly and keeps the columns. If your Excel uses semicolons as the list separator, choose Semicolon as the Delimiter first.

How is nested JSON flattened?

Each nested key path becomes a column name joined with dots, so {"address":{"city":"Pune"}} produces an address.city column. Arrays are handled by the Arrays option. The guide How nested JSON becomes CSV columns compares the strategies and their trade-offs.

Can I turn the CSV back into JSON?

Yes. Use Back to JSON, which opens CSV to JSON. Turn on Rebuild nested objects there, and dotted columns such as address.city and index columns such as tags.0 are rebuilt into nested objects and arrays.

What if my records have different keys?

Every key found in any record becomes a column, and records without that key get an empty cell. Nothing is dropped. This makes the converter suitable for API data where optional fields appear only on some records.

Are values quoted correctly?

Yes. Values that contain the delimiter, a double quote or a line break are wrapped in double quotes, and inner quotes are doubled, following RFC 4180. Other values are written without quotes. Numbers and booleans are written as plain text, as CSV has no types.

Before converting, format and validate the JSON to check its structure. To inspect or clean up a CSV file, use the CSV Viewer & Formatter. For tab-separated output for a database import, choose Tab as the delimiter, or use TSV to CSV to switch an existing file.

Browse all Data Formatters & Converters

Guides