How to Convert JSON to CSV: Complete Guide
Last updated: 2026-04-14
APIs return JSON. Spreadsheets want CSV. If you have ever stared at a nested JSON response wondering how to get it into Google Sheets or Excel, you are not alone. Converting JSON to CSV flattens hierarchical data into rows and columns that any spreadsheet or SQL tool can consume.
Step-by-Step: Convert JSON to CSV with Convertee
- Open Convertee and set the source to JSON and the target to CSV.
- Paste your JSON (an array of objects works best) into the input panel or drop a
.jsonfile. - Review the options: delimiter, quote character, and whether to include a header row.
- Press Convert (Cmd+Enter).
- Copy the CSV output or download it.
Everything happens client-side. Your JSON never touches a remote server.
Understanding the Formats
JSON
JSON (RFC 8259) represents structured data with objects, arrays, strings, numbers, booleans, and null. For conversion to CSV, the input should be an array of objects with consistent keys. Nested objects are flattened using dot-notation (e.g., address.city).
CSV
CSV (RFC 4180) is a flat, text-based table. Each line is a record, fields are delimited (usually by commas), and values containing the delimiter or newlines are quoted.
Before / After Example
Input JSON:
[
{ "id": 1, "product": "Widget", "price": 9.99 },
{ "id": 2, "product": "Gadget", "price": 24.50 }
]Output CSV:
id,product,price
1,Widget,9.99
2,Gadget,24.50Common Use Cases
- Spreadsheet analysis. Dump an API response into CSV so your team can filter and pivot in Excel or Google Sheets.
- Database import. Many database GUIs (pgAdmin, DBeaver) accept CSV for bulk imports.
- Reporting and compliance. Finance and HR teams often request data in CSV because their tools predate JSON by decades.
- ETL pipelines. CSV acts as a lightweight intermediate format when moving data between services that don't share a common API.
Options and Configuration
| Option | Default | What It Does |
|---|---|---|
| Delimiter | Comma (,) | Pick comma, tab, semicolon, or pipe. European locales often use semicolons because commas serve as decimal separators. |
| Quote character | Double quote (") | Wraps values that contain the delimiter, newlines, or the quote character itself. |
| Header row | On | Outputs JSON keys as the first CSV row. |
| Flatten depth | 1 | How many levels of nested objects to flatten. Depth 0 keeps nested values as JSON strings; depth 1 flattens one level using dot notation. |
Frequently Asked Questions
- What JSON structure works best for CSV conversion?
- An array of flat objects with consistent keys produces the cleanest CSV. Nested objects are flattened using dot notation (e.g., address.city becomes a column named 'address.city').
- How are nested JSON objects handled?
- Convertee flattens one level of nesting by default. Deeper nesting is serialized as JSON strings in the CSV cell. You can adjust the flatten depth in the options.
- Will my data be sent to a server?
- No. Convertee processes everything locally in your browser. Nothing is uploaded or stored remotely.