What this converter does
JSON is how most APIs, apps and exports hand over data. It suits programs, but you cannot sort or filter it in a spreadsheet. CSV is a plain table that Excel, Google Sheets and almost every database can open. Paste JSON or choose a file, check the preview, and copy or download the CSV. Everything happens in your browser.
Shapes it understands
- An array of objects. The most common case. Each object becomes a row and each key becomes a column.
- A single object. It becomes one row. If the object holds a list of records, as many API responses do with something like
"data": [...], the tool uses that list as the rows and tells you so. Under Rows from you can pick another list or the whole object. - JSON Lines. A file with one JSON record per line, often called .jsonl or NDJSON, is common for logs and data exports. It is detected by itself, so you do not have to choose a mode.
- Plain values. A list of numbers or strings becomes a single column called value.
Nested objects and arrays
A table is flat, but JSON often is not. The converter flattens nested objects with dot names, so a customer's city lands in a column called address.city. Flatten depth sets how many levels may join in a column name. At depth 1 only the top-level keys become columns and anything deeper is written into the cell as compact JSON text, which is handy when you only need a few main fields.
Arrays need a decision, because a list of tags does not fit in one cell by default. You have three choices:
- Join into one cell, for example
admin; editor. Good for short lists of words. - One column per item, such as
tags.0andtags.1. Good when every record has the same few items. Objects inside the array are flattened further, so you get columns likeitems.0.price. - Keep as JSON text. The cell holds the array exactly as JSON, ready to be parsed again later.
Records with different keys
Real data is rarely tidy: one record has a phone number and the next one does not. Every key found in any record becomes a column, so no value is lost, and a record without that key gets an empty cell. Columns appear in the order they are first seen, or in natural alphabetical order, where tags.2 comes before tags.10. Open Columns to untick the ones you do not need.
Choosing the CSV format
The common format is described in RFC 4180: commas between fields, a line break after every row, and double quotes around any field that contains a comma, a quote or a line break, with a quote inside a field written twice. The tool follows these rules by default and uses CRLF line endings, as the RFC does.
You can change the details when the program that reads the file expects something else:
- Semicolon. In countries that write decimals with a comma, such as Germany or France, Excel often expects semicolons between fields.
- Tab. Tab-separated text pastes straight into spreadsheet cells.
- Pipe. Useful when the data itself is full of commas and semicolons.
- Quote every field, for strict importers, and LF line endings for Mac and Linux tools.
If accented letters or non-Latin text such as Urdu look broken after you open the file in Excel, tick Add a BOM to the download. The byte order mark at the start of the file tells some versions of Excel that the file is UTF-8. Copy never adds it.
Excel-safe mode and formula injection
A spreadsheet treats a cell that starts with =, +, - or @ as a formula. If your data comes from other people, a value like =HYPERLINK(...) could run when someone opens the file. This is known as CSV injection or formula injection. With Excel-safe on, such text gets a single quote in front, so the spreadsheet shows it as plain text. Real JSON numbers, including negative ones, are never changed.
Big numbers stay exact
JavaScript holds whole numbers exactly only up to 9,007,199,254,740,991. Converters that use the browser's built-in JSON reader quietly change a longer ID such as 12345678901234567890 into a different number. This tool reads the JSON itself and writes every number exactly as written, and a note tells you when it found numbers above that limit.
When the JSON is invalid
If the input is not valid JSON, you get the line and column of the problem and a plain reason: a trailing comma, single quotes, a missing comma, a comment, or a key without quotes. Tidy it with the JSON formatter, and see how to fix the most common JSON errors or what an Unexpected token error means.
Privacy and limits
Your JSON is not uploaded, saved or tracked. Pasted text is limited to 500,000 characters, files to 2 MB and tables to 2,000 columns, so the page stays fast. Large results show a preview, while Copy and Download give the full CSV. Like every page on this site, this one may show ads from third-party vendors once ads are switched on, and those vendors can use cookies. Read the privacy policy for details.