JSON is the format of APIs and web apps, but spreadsheets, reports and many business tools work with CSV. The JSON to CSV Converter above turns JSON into a clean table that you can open in Excel or Google Sheets. It flattens nested data into columns, quotes values correctly, lets you choose the delimiter, and can protect your file against spreadsheet formula problems. It runs in your browser, so your data is never uploaded.
Table of Contents
Which JSON Shapes Work?
CSV is a flat table, so the tool needs JSON that can become rows. These shapes are supported:
| JSON shape | Result |
|---|---|
Array of objects [{...},{...}] |
One row per object. Columns come from the keys. This is the best case. |
Array of arrays [[1,2],[3,4]] |
One row per inner array, with columns named column1, column2 and so on. |
Array of plain values [1,"a",true] |
A single column named value. |
One object {...} |
A table with one row. |
| JSON Lines (one object per line) | Detected automatically and treated as an array. |
How to Use the JSON to CSV Converter
- Add your JSON. Paste it into the input box, or click Open File to load a
.jsonfile. Click Try Sample to see an example. - Choose the delimiter. Use a comma for most tools, a semicolon if your spreadsheet expects it, or a tab for TSV files.
- Choose how to handle nested data. Flatten it into columns, or keep it as JSON text inside one cell.
- Check the result. The CSV updates as you type. If the JSON has a problem, a message shows the line and column with a pointer to the exact spot.
- Copy or download. Click Copy CSV or Download .csv.
Settings Explained
| Setting | What it does |
|---|---|
| Delimiter | Comma, semicolon, tab or pipe. Values that contain the delimiter are put in quotes automatically. |
| Nested objects and lists | "Flatten" creates columns such as address.city and tags.0. "Keep as JSON text" writes the nested part as JSON in one cell. |
| Line breaks | LF suits Mac and Linux. CRLF suits Windows. Most modern tools read both. |
| Include header row | Writes the column names on the first line. |
| Sort columns A to Z | Sorts the columns by name. Off keeps the order in which keys first appear. |
| Quote every field | Puts all values in quotes, not just the ones that need it. |
| Protect against spreadsheet formulas | Adds a single quote before text that starts with =, +, - or @. Numbers are not changed. |
| Add BOM when downloading | Adds a byte order mark so Excel can recognize UTF-8 text. It affects the downloaded file only. |
How Nested Data Becomes Columns
When you flatten, each nested value gets a column name built from its path. For example:
{"name": "Ann", "address": {"city": "Austin"}, "tags": ["admin", "beta"]}
becomes these columns: name, address.city, tags.0 and tags.1. If rows have different keys, the tool creates one column for every key that appears anywhere, and leaves missing cells empty. Empty lists and objects are written as [] and {}. Booleans become true or false, and null becomes an empty cell.
Numbers are written with their original digits, so a large ID such as 12345678901234567890 or a value such as 1.50 is not changed.
Tips for Excel and Google Sheets
- Accents and symbols. Keep Add BOM when downloading on, so Excel reads the file as UTF-8. Without it, characters such as é or 日本 can appear broken.
- Semicolons. In many regions, Excel expects semicolons instead of commas. If everything lands in one column, change the delimiter.
- Leading zeros and long numbers. When Excel opens a CSV by double-click, it may turn
02134into 2134 and show very long numbers in scientific notation. Use Excel's text import option, or import the file into Google Sheets as plain text.
=, +, - or @ as a formula. This is known as CSV injection, and it matters when the JSON comes from users or from outside sources. Turn on Protect against spreadsheet formulas before you open such a file. You can read more in the OWASP guide to CSV injection.Common JSON Errors and How to Fix Them
| Message | Fix |
|---|---|
| Trailing commas are not allowed in JSON | Remove the comma after the last item. |
| JSON strings must use double quotes | Replace single quotes with double quotes. |
| Text values and keys must be in double quotes | Put keys such as name in quotes: "name". |
| Comments are not allowed in JSON | Remove // and /* */ comments. |
| The JSON must be an array or an object | A single text, number or true/false value cannot become a table. Wrap it in an array. |
Limitations to Know
- CSV is flat. Deeply nested data creates many columns. If the table gets too wide, use "Keep as JSON text".
- No data types. CSV stores everything as text, so the type of a value, such as the number 1 versus the text "1", is not kept.
- Column names with dots. A key that already contains a dot can clash with a flattened path. The tool shows a note when two values share a column name.
- Large files. Conversion runs in your browser, so very large JSON files may feel slow on older devices.
Frequently Asked Questions
Is the JSON to CSV Converter free, and is my data uploaded?
It is free and needs no signup. The conversion runs in your browser, so your JSON stays on your device.
What happens to nested objects and arrays?
By default they are flattened into columns with names like address.city and tags.0. You can also keep each nested part as JSON text inside a single cell.
Why do some of my values have quotes in the CSV?
Values are put in quotes when they contain the delimiter, a quote, a line break, or spaces at the start or end. This keeps the table correct when a program reads it. You can also turn on "Quote every field".
Why does Excel show strange characters?
Excel often needs a byte order mark (BOM) to read a CSV as UTF-8. Keep Add BOM when downloading on, and download the file instead of copying the text.
Can I convert a file with one JSON object per line?
Yes. If the text is not one valid JSON value but every line is, the tool recognizes JSON Lines and treats the lines as an array.
Will the order of columns match my JSON?
Yes. Columns follow the order in which keys first appear. Turn on "Sort columns A to Z" if you prefer alphabetical order.
Final Thoughts
Turning JSON into CSV is mostly about deciding how to flatten nested data and how to protect special characters. Use a flat array of objects when you can, check the first rows of the result, and turn on formula protection when the data comes from people you do not control.