JSON to CSV Converter

Delimiter

Nested objects become dot-separated columns (user.name) and arrays become numbered columns (tags.0, tags.1), so no value is lost. Empty arrays and objects become empty cells.

Paste JSON or open a file

The result updates as you type or open a file.

Processed locally in your browser. Your input is not uploaded or saved by this tool.

Need the other direction? Convert CSV to JSON

About this tool

This JSON to CSV converter turns an array of JSON objects, such as an API response or a database export, into a CSV table that opens in Excel, Google Sheets or LibreOffice. Nested objects are flattened into columns with dot paths, arrays become numbered columns, and the columns of all records are combined in the order they first appear.

Paste JSON or open a .json file of up to 5 MB, choose the delimiter and whether to write a header row, then copy the CSV or download it. Fields that contain the delimiter, quotes or line breaks are quoted as RFC 4180 requires. Everything happens in your browser.

How it works

The input can be an array of objects (one row per object), an array of arrays (one row per inner array), an array of plain values (one column named value) or a single object (one row). Invalid JSON is reported with its line and column when the browser provides them.

Nested objects become columns named with dot paths, for example user.name and user.address.city. Arrays become numbered columns with zero-based indexes, such as tags.0 and tags.1, so every value is kept even when records have different array lengths. Empty arrays and objects, missing keys and null all become empty cells. Numbers and booleans are written as they appear in JSON.

The CSV uses CRLF line endings. Choose a semicolon if your spreadsheet uses the comma as the decimal separator, and switch on the byte order mark when Excel shows accented letters incorrectly.

Example

Take two records with a nested user object and a tags array:

[{"id": 1, "user": {"name": "Ada", "email": "[email protected]"}, "tags": ["math", "code"]}, {"id": 2, "user": {"name": "Alan"}, "tags": ["logic"]}]

The CSV has the columns id, user.name, user.email, tags.0 and tags.1. The first row is 1,Ada,[email protected],math,code. The second row is 2,Alan, then an empty email, logic and an empty tags.1 cell, because Alan has no email and only one tag.

Assumptions and limits

The input is limited to 5 MB of text; above 300,000 characters the result updates only when you press Convert. JSON is parsed with the browser's standard parser, so integers larger than 9,007,199,254,740,991 can lose precision and duplicate keys keep only their last value. Arrays inside arrays of arrays are written as JSON text in one cell. The tool does not protect against spreadsheet formulas, so a value that starts with = can be evaluated when the file is opened in a spreadsheet. The data never leaves your browser.

Frequently asked questions

How do I convert JSON to CSV for Excel?

Paste the JSON or open the file, keep Write a header row switched on and download the CSV. If Excel shows accented letters or symbols incorrectly, switch on the byte order mark option. If Excel puts everything in one column, choose the semicolon delimiter, which Excel expects in locales that use a decimal comma.

How are nested objects and arrays handled?

Every nested value gets its own column. Object keys are joined with dots, such as address.city, and array elements are numbered from zero, such as items.0.sku and items.1.sku. This keeps all values and lets you rebuild the structure later, but very long arrays produce many columns.

What if my records have different keys?

The converter collects every key from every record. Columns appear in the order in which they first occur, and a record without a key gets an empty cell in that column.

My JSON is an object with a data array inside. What should I do?

A single object becomes one row, so an API response like {"data": [...]} turns into columns named data.0.id, data.1.id and so on. Paste only the array part, from the opening [ to the closing ], to get one row per record.

Why are some values wrapped in quotes?

CSV requires quotes around values that contain the delimiter, a double quote or a line break, and quotes inside such values are doubled. The converter also quotes values with leading or trailing spaces so that spreadsheets keep the spaces.

Link with your values

Add these parameters to this page’s address to open it with the values filled in, for example to share a calculation or to link to it from an AI assistant. The result is calculated in the browser: the page HTML shows an example for the default values, and the tool sets the data-url-params attribute once the link’s values are applied.

ParameterValueIf omitted
jsonJSON inputnot accepted in links: enter it on the page
delimiterDelimiterone of: comma, semicolon, tab, pipedefault comma
headerWrite a header rowtrue or falsedefault true
byte_order_markAdd a byte order mark so Excel reads UTF-8 correctlytrue or falsedefault false

Examples

  • ?delimiter=semicolon&byte_order_mark=true
  • ?delimiter=tab&header=false

Write decimals with a point. Encode a space as %20, + as %2B, # as %23 and & as %26.

Result elements: [data-result-block="csv-json"]