How do I convert JSON to CSV online?
Paste a JSON array of objects and instantly get a CSV file with headers extracted from the JSON keys. The tool flattens nested objects, lets you select columns, and handles special characters. Download as .csv or copy to clipboard. Everything runs in your browser.
[
{"name":"Alice","age":28,"city":"NYC"},
{"name":"Bob","age":35,"city":"London"}
]name,age,city Alice,28,NYC Bob,35,London
JSON to CSV Converter
Convert JSON arrays to CSV format. Automatically flattens nested objects with dot notation, lets you select columns, and download as a .csv file.
About JSON to CSV Conversion
- Nested objects are flattened using dot notation (e.g.
address.city). - Arrays within objects are serialized as JSON strings in the CSV output.
- Select or deselect columns after converting to customize your output.
- Supports comma, tab, semicolon, and pipe delimiters.
- Download the result as a .csv file ready for Excel, Google Sheets, or any spreadsheet app.
- Everything runs in your browser — no data is sent over the network.
Tips & Best Practices
Flatten nested objects before converting to CSV
CSV is inherently flat — there are no nested columns. When converting JSON with nested objects, flatten keys using dot notation (user.address.city → user_address_city). This preserves the data hierarchy in column names while keeping the output importable into Excel, Google Sheets, and databases.
Commas and newlines inside values break naive CSV parsers
If a JSON string value contains commas, quotes, or newlines, the CSV cell must be wrapped in double quotes with internal quotes escaped as "". Many hand-rolled CSV converters skip this, producing corrupt files that import incorrectly into spreadsheets and databases.
Export API responses to CSV for stakeholder reports
Product managers and data analysts often need API data in spreadsheets. Converting a /api/users JSON response to CSV lets them build pivot tables and charts in Excel without writing code. Use consistent field ordering so the columns align across exports.
CSV injection can execute formulas in spreadsheets
If JSON values start with =, +, -, or @, Excel and Google Sheets interpret them as formulas. A malicious value like '=HYPERLINK("http://evil.com","Click")' can execute when opened. Prefix dangerous values with a single quote or tab character before CSV export.