About this json to csv converter
JSON is how most APIs return data; CSV is how spreadsheets, databases and analytics tools like to receive it. This converter turns a JSON array (or a single object) into a CSV table you can open in Excel or Google Sheets, with quoting and escaping done the way the CSV standard requires.
The conversion happens live as you type, in your browser. Nothing is uploaded, so it is safe to use on internal or customer data.
How to use it
- Paste your JSON into the left box, or press “Load example” to see how it works.
- Pick a delimiter (comma, semicolon, tab or pipe) and choose whether to include a header row.
- Leave “Flatten nested objects” on to turn {"address":{"city":"London"}} into a column called address.city.
- Check the CSV on the right, then copy it or download it as a .csv file.
JSON versus CSV in practice
JSON is hierarchical: objects can contain other objects and arrays of any depth. CSV is a flat grid of rows and columns where every row has the same fields. Converting between them means deciding how to flatten the structure. This tool uses the common convention of dotted column names for nested objects (for example user.address.city) and writes arrays and any other complex values into a single cell as compact JSON text, so no information is lost.
The input is usually an array of objects, where each object becomes one row. If the objects do not all have the same keys, the converter builds the header from the union of all keys in the order they first appear, and leaves a cell empty where a row has no value. If your JSON is an API response such as {"status":"ok","data":[…]}, the tool detects the single array of records and converts that array.
Escaping rules that keep your CSV valid
A naive converter that wraps every value in quotes will break as soon as a value contains a quote. The accepted CSV convention (RFC 4180) is that a field must be enclosed in double quotes if it contains the delimiter, a double quote or a line break, and any double quote inside the field is written twice. This tool applies exactly that rule, so a name like Alan Turing, OBE or a note containing "hello" opens correctly in a spreadsheet instead of shifting data into the wrong columns.
Null values become empty cells, booleans and numbers are written as plain text, and line breaks inside strings are preserved inside quoted fields.
Opening the result in Excel or Google Sheets
In Google Sheets, use File → Import → Upload and choose the downloaded file, or paste the CSV directly. In Excel, use Data → From Text/CSV so that you can pick the delimiter and encoding explicitly. In some regions, Excel expects a semicolon as the list separator because the comma is used as the decimal mark; if a double-clicked file lands in one column, re-export with the semicolon delimiter.
The download is UTF-8 with a byte-order mark so that Excel recognises accented letters and non-Latin scripts. Very large files (many megabytes) are better converted with a command-line tool or script, since a browser tab has limited memory.
Frequently asked questions
Is my JSON uploaded to a server?
No. The conversion runs entirely in your browser, so your data never leaves your device.
How are nested objects handled?
With “Flatten nested objects” on, each nested key becomes its own column named with dots, such as address.city. Arrays are kept in one cell as JSON text. Turn flattening off to store each nested object as JSON text in a single cell.
What if my objects have different keys?
The header contains every key found in any object, in order of first appearance. Rows that lack a key get an empty cell.
Why does the tool say my JSON is invalid?
JSON requires double-quoted keys and strings, no trailing commas and no comments. The error message includes the position of the first problem so you can fix it.
Can I convert CSV back to JSON?
Not with this tool yet. It converts JSON to CSV only.
Does it handle very large files?
It works well for typical API responses and exports. Extremely large files are limited by your browser’s memory, so use a script or command-line tool for those.
Related tools
- URL Encoder & DecoderPercent-encode or decode URLs and query strings, and break a URL into its parts.
- Base64 Encoder & DecoderEncode text to Base64 or decode Base64 back to text, with full Unicode and URL-safe support.
- JWT DecoderDecode a JSON Web Token locally to read its header, payload and expiry without sending it anywhere.
- Word & Character CounterCount words, characters, sentences and paragraphs, estimate reading time and see top keywords.