Data Tools

JSON to CSV Converter

Choose a .json file or paste JSON, and get a CSV that opens straight in Excel or Google Sheets. Nested objects become columns like address.city, records with different keys still line up, and nothing is uploaded.

Free · No sign-up · Files stay on your device

By Aditya Kr Sharma

  • Free
  • Instant
  • No sign-up

JSON to CSV

Or import from
Supports: JSONTXTNDJSONJSONL

Files are not uploaded - everything happens in your browser.

Need it the other way? Convert CSV to JSON →

How to use the JSON to CSV tool

  1. Choose a .json file, or paste the JSON into the box.
  2. Leave the array path empty to let the tool find the records, or type one such as data.items.
  3. Pick how arrays inside a record are written, the delimiter, and whether Excel needs a byte-order mark.
  4. Press Convert, check the preview, then download the CSV.

Why convert JSON to CSV

API output, app exports, database dumps and analytics downloads very often arrive as JSON. It is a fine format for programs, but the person who has to check, sort, filter or total the data usually works in Excel or Google Sheets, and neither opens JSON in a useful way. CSV is the bridge: a plain table of rows and columns that every spreadsheet, database and reporting tool understands.

This converter does the translation in your browser. The JSON is parsed on your device, turned into rows, and written as a standard CSV file you can download. Nothing is sent to a server, which matters when the data contains customer details, orders or anything else that should not leave your computer.

How the rows and columns are decided

A CSV needs a list of records. If your JSON is already an array of objects, each object becomes a row. If the array sits inside an object, as in {"status":"ok","results":[…]}, the tool takes the longest list found at the top level and the page shows which path it chose, here results. When the list is buried deeper, as in {"data":{"items":[…]}}, type its path, data.items, in the array path box.

The columns are the union of every key found in every record. If one record has a phone number and another does not, the phone column is still there and the second row simply leaves it blank. Columns appear in the order they are first met, or alphabetically if you tick "Sort columns".

Newline-delimited JSON, also called NDJSON or JSON Lines, where each line is a separate object, is common in log files and data exports. It is detected automatically, so you can paste or choose it like any other JSON.

Nested objects and arrays

Spreadsheets are flat, JSON is not. Nested objects are flattened into dot-path columns: {"address":{"city":"Pune","pin":"411001"}} becomes two columns, address.city and address.pin. Nothing is lost, and the column names tell you exactly where each value came from, so the CSV can be turned back into the same JSON later.

Arrays inside a record can be written in two ways. "Numbered columns" gives each element its own column, such as tags.0, tags.1 and tags.2. This is the default because it loses nothing, although deeply nested arrays can make the sheet very wide. "Join into one cell" puts the elements of a simple list together in a single cell, separated by a semicolon, which is easier to read when the list is short, such as a set of tags or categories.

Quoting, delimiters and Excel

Values that contain a comma, a quotation mark or a line break are quoted following RFC 4180, the CSV standard, so they land in the right cell. Numbers and true or false are written as they are; empty and missing values become empty cells.

Comma is the usual delimiter. In countries where the comma is the decimal separator, such as much of Europe, Excel expects a semicolon instead, so pick semicolon if your columns all end up squashed into one. Tab gives a TSV file that pastes cleanly into any spreadsheet. If your data contains names in Indian scripts, accented letters or emoji, tick the byte-order mark option; it tells Excel that the file is UTF-8, so the characters are displayed correctly instead of as strange symbols.

When the JSON will not convert

If the text is not valid JSON, the page says so and, where it can, points to the line or position of the problem. The usual causes are a trailing comma after the last item, single quotes instead of double quotes around keys, comments, or a file that was cut off part way. Fix the spot shown and convert again. A single object with no array inside it becomes a CSV with one row, which is correct but rarely what you want, so check that you copied the whole response.

A small worked example

Suppose an API returns three orders, each with an id, a customer object holding a name and a city, and a list of item codes. With the default settings you get one row per order and the columns id, customer.name, customer.city, items.0, items.1 and so on, as many item columns as the longest list needs. Switch arrays to "Join into one cell" and the item codes collapse into a single items column such as A12; B07; C33, which is easier to scan and to filter with a text search in Excel. Both versions hold exactly the same data; choose the one that suits what you are going to do with the sheet.

Privacy

The JSON is read and converted in this browser tab. It is never uploaded, there is no account, and closing the tab clears everything.

Frequently asked questions

What happens to nested objects?

They become dot-path columns, so {"a":{"b":1}} becomes a column named a.b with the value 1.

Does it handle newline-delimited JSON?

Yes. One JSON object per line (NDJSON or JSON Lines) is detected automatically.

My records have different keys. Will the columns line up?

Yes. The columns are the union of all keys, and a record without a key simply leaves that cell empty.

Why does Excel show strange characters?

Excel needs a byte-order mark to read UTF-8. Tick "Add a byte-order mark for Excel" and convert again.

How do I pick which array becomes the rows?

Type its path in the array path box, for example data.items or results. Leave it empty to let the tool take the longest top-level list.

Can I convert the CSV back to JSON?

Yes. Use CSV to JSON on this site.

Is my JSON uploaded?

No. It is parsed and converted entirely in your browser.

More in Data Tools All tools