Free JSON to CSV Converter
Paste a JSON array and get clean, Excel-ready CSV instantly. Auto-flattens nested objects, configurable delimiter, UTF-8 BOM support. All in your browser.
Input JSON
CSV Output
What Is JSON to CSV Conversion?
CSV (Comma-Separated Values) is the universal format for tabular data. Every spreadsheet app reads it, every database imports it, and every data analysis tool understands it. JSON is the universal format for structured API data.
Converting JSON to CSV lets you take data from an API, a webhook, or a database export and open it directly in Excel, Google Sheets, Numbers, or any spreadsheet — where you can sort, filter, pivot, and chart it without writing a single line of code.
The most common shape: array of objects
The ideal JSON input looks like this:
[
{ "name": "Alice", "age": 30, "city": "New York" },
{ "name": "Bob", "age": 25, "city": "London" }
]
Each object becomes one row. Each key becomes one column. The result:
name,age,city Alice,30,New York Bob,25,London
What about nested objects?
Real APIs love to nest. Consider this:
[
{
"name": "Alice",
"address": { "city": "New York", "zip": "10001" },
"tags": ["admin", "verified"]
}
]
With Flatten nested enabled, the converter produces dot-notation columns:
name,address.city,address.zip,tags.0,tags.1 Alice,New York,10001,admin,verified
Nested objects use dot-notation (address.city), and nested arrays use index-notation (tags.0, tags.1). With flattening off, nested values are serialised as JSON strings in a single cell — useful when you want to preserve the exact structure but still export to a spreadsheet.
Handling missing keys across rows
Real-world JSON is often ragged — some rows have fields others don't:
[
{ "name": "Alice", "age": 30 },
{ "name": "Bob", "city": "London" }
]
The converter scans every row and unions all keys to build a single column set. Rows missing a key get an empty cell:
name,age,city Alice,30, Bob,,London
Columns are ordered by first appearance, which makes the output deterministic and matches the natural shape of your data.
CSV escaping rules (RFC 4180)
CSV has one strict rule: if a value contains the delimiter, a double quote, or a line break, it must be wrapped in double quotes, and any internal double quotes must be doubled. The converter follows this automatically:
| Value | Output |
|---|---|
Hello | Hello |
Hello, world | "Hello, world" |
He said "hi" | "He said ""hi""" |
Line 1\nLine 2 | "Line 1\nLine 2" |
This is exactly what Excel, Google Sheets and every CSV parser expects. Without it, values with commas would split into extra columns.
Choosing a delimiter
| Delimiter | Best for |
|---|---|
| Comma ( , ) | US/UK Excel, Google Sheets, most parsers, RFC 4180 standard |
| Semicolon ( ; ) | European locales (German, French, Spanish, Italian) where the comma is a decimal separator |
| Tab ( ⇥ ) | TSV format, some data tools, avoids quoting entirely for most data |
| Pipe ( | ) | Data containing both commas and semicolons — rare but unambiguous |
Excel and UTF-8 — the BOM trick
Excel on Windows has a notorious bug: it assumes CSV files are encoded in the system's legacy code page (Windows-1252) instead of UTF-8. This garbles any non-ASCII character — accents (é, ñ), emoji (😀), and non-Latin scripts (日本語, العربية).
The fix is a UTF-8 BOM — three bytes at the start of the file (EF BB BF) that tell Excel "read this as UTF-8". Other parsers ignore the BOM. Enable the option if your data contains non-ASCII characters and you're targeting desktop Excel.
Common use cases
Analyse API Data
Export JSON API responses to CSV for analysis in Excel or Python.
Database Import
Convert JSON exports to CSV for bulk import into SQL, MySQL or Postgres.
Reports & Spreadsheets
Turn JSON log data into shareable spreadsheet reports.
Send to Non-Developers
Give marketing, ops or finance teams data in a format they can actually use.
Product Catalogues
Export e-commerce product data to CSV for bulk upload tools.
Email Lists
Convert JSON contact exports to CSV for email marketing platforms.
Data Pipelines
Intermediate step in ETL workflows that end in CSV.
Google Sheets
Import JSON exports directly into a Google Sheet for collaboration.
How the converter works
- Parse the JSON input with
JSON.parse(native, fast, spec-compliant). - Normalise the top-level shape: array of objects, single object, or array of primitives.
- Flatten each row (if enabled) with dot-notation for nested objects and arrays.
- Union all keys across rows to build the column set, in order of first appearance.
- Escape each value per RFC 4180 — quote when it contains the delimiter, a quote, or a newline.
- Join rows with the chosen line ending (LF or CRLF) and join cells with the chosen delimiter.
Privacy and security
This JSON to CSV converter runs entirely in your browser. Parsing uses native JSON.parse; the conversion, escaping, table rendering and download all happen locally. Your JSON never leaves your device — safe for API keys, customer records, financial data, and any other sensitive payload.
Frequently Asked Questions
What kind of JSON can I convert to CSV?
[{"name":"Alice","age":30},{"name":"Bob","age":25}]. Each object becomes a row, and each key becomes a column. A single object also works — it becomes one row. Nested objects and arrays are automatically flattened using dot notation.How are nested objects handled?
{"user": {"name": "Alice"}} becomes a column called user.name with value Alice. Nested arrays are also flattened with index notation: tags.0, tags.1, and so on. If you turn flattening off, nested values are serialised to JSON strings in a single cell.What if different rows have different keys?
What delimiter should I use?
Why does Excel show my CSV wrong?
How are commas and quotes inside my values handled?
Hello, world becomes "Hello, world". This is what every CSV parser expects.Can I convert JSON objects that are not arrays?
[1,2,3] produces a single-column CSV with one value per row. Deeply-nested or irregular JSON produces the best results when Flatten is enabled.What is the maximum size?
jq.