JSON to CSV Converter

Convert a JSON array to a CSV file for Excel or Google Sheets. Nested objects become columns like address.city.

The conversion runs in your browser; your data is never uploaded.

Comma ( , )
Join lists: a; b; c
CSV

This JSON to CSV converter turns JSON data, such as an API response, a database export or a list of records, into a CSV file you can open in Excel, Google Sheets or Numbers. Nested objects are flattened into their own columns, lists inside records are handled the way you choose, deeply nested lists can be expanded into one row per item, and every row gets every column even when some records are missing fields. The conversion runs entirely in your browser.

How to Convert JSON to CSV

  1. Paste JSON or open a file. Use Sample to see how a typical file converts.
  2. Pick the delimiter: comma for most uses, semicolon for European versions of Excel, tab for TSV.
  3. Choose how to handle lists inside each record.
  4. Check the preview table, then download or copy the CSV.

Example: Nested JSON to CSV

This JSON record:

{"id": 1, "name": "Ayesha Khan", "address": {"city": "Lahore", "zip": "54000"}, "tags": ["admin", "editor"]}

becomes this CSV, with the default settings:

id,name,address.city,address.zip,tags
1,Ayesha Khan,Lahore,54000,admin; editor

Columns appear in the order fields are first found. A record missing a field gets an empty cell in that column rather than shifting the rest of its row.

Deeply Nested JSON: Choosing What a Row Is

In data such as a company with departments, each with projects, each with team members, there is no single right table: you might want one row per department, per project or per person. When the JSON contains lists inside lists, a Rows from menu appears with every option it found. Choosing departments → projects → teamMembers gives one row per team member, with columns like:

departments.name,projects.title,projects.status,teamMembers.name,teamMembers.skills
Engineering,Cloud Migration,In Progress,Bob Smith,Kubernetes; Docker; AWS
Engineering,Cloud Migration,In Progress,Charlie Brown,Node.js; PostgreSQL; Redis

Fields from parent records are prefixed with the name of their list, so departments.name and teamMembers.name stay apart. Fields of a single object at the very top, such as a {"data": [...], "total": 50} wrapper, are not repeated on every row; if the JSON is a top-level array, its items' fields are. When the JSON is a single object, Whole JSON as one row puts everything in one wide row instead.

How Special Characters Are Handled

The output follows RFC 4180, the common CSV standard. A value containing the delimiter, a double quote or a line break is wrapped in double quotes, and any double quote inside it is doubled, so Li Wei, Jr. becomes "Li Wei, Jr." and Says "hi" becomes "Says ""hi""". Every spreadsheet reads these back as the original text. null becomes an empty cell, and true and false are written as words.

If the Converter Says the JSON Is Invalid

The error shows the line and column where parsing stopped. JSON copied from JavaScript code or a log often has trailing commas, comments or single quotes; the JSON Formatter & Validator shows the problem and can usually fix it in one click, after which you can paste the fixed JSON back here. Files that hold one JSON object per line (JSON Lines) need to be wrapped in [ ] with commas between the lines first.

Frequently Asked Questions

How do I convert JSON to CSV?

Paste the JSON or open a .json file. The CSV is built as you type, with a table preview below. Press Download to save it as a .csv file, or copy it.

What JSON shape does it need?

An array of objects, such as [{"name":"Ali"},{"name":"Sara"}], gives one row per object. If the array is inside an object, as in many API responses ({"data": [...]}), the first array is used and the preview says which. A single object becomes one row.

How are nested objects handled?

They are flattened into columns named with dots: {"address": {"city": "Lahore"}} becomes a column called address.city. Objects nested several levels deep keep adding to the name, such as address.geo.lat.

How do I get one row per nested item, like each order or team member?

Use Rows from. It lists every list of records in your JSON, at any depth, such as departments → projects → teamMembers. Pick one and each of its items becomes a row, with the fields of the records above it (the department and the project) repeated on every row, which is what you need to filter or pivot the data in Excel. A parent with an empty list still gets one row, so nothing disappears.

What happens to arrays inside each record?

By default a list of plain values is joined into one cell, like admin; editor. You can instead spread each item into its own column (tags.0, tags.1) or keep the whole array as JSON text. Lists of objects are kept as JSON text in join mode, since they cannot be joined sensibly.

Why does my CSV show strange characters in Excel?

Excel may read a CSV with the wrong character set and garble accents, Urdu, Arabic or Chinese text. Keep Excel-friendly turned on: it adds a UTF-8 marker at the start of the file so Excel reads it correctly.

When should I use a semicolon instead of a comma?

In countries where the comma is the decimal separator (much of Europe, for example), Excel expects semicolon-separated files. Choose semicolon there, or tab for a TSV file that pastes cleanly into any spreadsheet.

Can I convert a JSON file from a URL or JSON Lines?

Yes. Open a file, drop it on the box, or use From URL to load an API response directly in your browser. Files with one JSON object per line (JSON Lines or NDJSON) are read as a list of records automatically.

Will long ID numbers stay correct?

Yes. Whole numbers longer than 15 or 16 digits, such as 64-bit database or social-media IDs, would normally be rounded by JavaScript; in browsers that let a page read the original number text (recent Chrome, Edge and Firefox) this converter writes them to the CSV digit for digit. Note that Excel itself shows long numbers in scientific notation unless the column is formatted as text.

Is my data uploaded?

No. The conversion is done in your browser and the data never leaves your device.