JSON CSV Converter
Convert JSON arrays to CSV or turn CSV back into JSON for spreadsheets, reports and imports.
Back to all tools on ToolForge
Result
About JSON CSV Converter
This JSON CSV converter turns JSON arrays into CSV rows and can also parse CSV back into JSON records.
It is useful when moving data between APIs, spreadsheets, admin tools and bulk import files, especially when you need a quick browser-based conversion without opening Excel or writing code.
JSON to CSV Conversion Details
The converter extracts keys from the first JSON object as CSV headers, then maps each subsequent object to a row. All values are stringified and properly escaped according to RFC 4180 CSV standards.
JSON Input Example:
[
{"name": "Tom", "age": 20, "city": "NYC"},
{"name": "Alice", "age": 25, "city": "LA"}
]
CSV Output:
name,age,city
Tom,20,NYC
Alice,25,LA
CSV Parsing Features
- Quoted fields: Handles values wrapped in double quotes
- Escaped quotes: Recognizes doubled quotes ("") as escaped quote characters
- Embedded newlines: Correctly parses multi-line values within quoted fields
- Empty values: Preserves empty cells as empty strings in JSON
- Header row: First CSV row becomes JSON object keys
Data Type Considerations
| JSON Type | CSV Representation | Notes |
|---|---|---|
| String | Quoted if contains comma/quote/newline | Special characters escaped |
| Number | Plain text | Returns as string in JSON |
| Boolean | "true" or "false" | Returns as string in JSON |
| Null | Empty cell | Becomes empty string in JSON |
Common Use Cases
- API data export: Convert API JSON responses to CSV for Excel analysis
- Bulk imports: Transform spreadsheet CSV exports to JSON for API imports
- Data migration: Move data between systems with different format requirements
- Report generation: Prepare data for tools that only accept CSV input
- Quick debugging: Inspect JSON data in tabular CSV format
Limitations
- Does not flatten deeply nested objects or arrays
- Does not support custom delimiters (tab, semicolon, pipe)
- Does not preserve number types when converting CSV back to JSON
- Memory-limited for very large files (practical limit ~10 MB)
How to Convert JSON to CSV
- Select mode: Choose "JSON to CSV" or "CSV to JSON" from the dropdown.
- Paste your data: Enter your JSON array or CSV text in the input field.
- Click Convert: The tool will parse and transform your data instantly.
- Copy the result: Click "Copy Result" to copy the converted data to your clipboard.
- Swap if needed: Use the "Swap" button to quickly switch input and output for bidirectional conversion.
Tips
- Ensure JSON is a valid array of objects with consistent keys
- CSV must have a header row for proper JSON key mapping
- Use the Swap button to quickly convert back and forth
- Large files may take longer to process in the browser
Frequently Asked Questions
- How does JSON to CSV conversion handle nested objects?
- This converter flattens only the first level of JSON objects. Nested objects are converted to their string representation. For deeply nested data, consider flattening your JSON structure first or using a dedicated data transformation tool.
- What CSV delimiter does this tool use?
- This tool uses comma (,) as the default delimiter, which is the standard CSV format. Values containing commas, quotes, or newlines are automatically wrapped in double quotes, with internal quotes escaped by doubling them.
- Can this tool handle large JSON or CSV files?
- The tool processes data in your browser's memory, so the practical limit depends on your available RAM. For best performance, keep files under 10 MB. Larger files may cause slow performance or browser memory warnings.
- How are null and undefined values handled in conversion?
- Null and undefined values are converted to empty cells in CSV. When converting back to JSON, empty cells become empty strings. If you need to preserve null vs empty string distinctions, consider using a more advanced data transformation tool.
- What encoding does this tool support?
- This tool uses UTF-8 encoding for all conversions. If your CSV data uses a different encoding (like Windows-1252 or ISO-8859-1), you may need to convert it to UTF-8 first for proper character display.
- Can I convert CSV with custom delimiters like tabs or semicolons?
- This tool uses standard comma-delimited CSV format. For tab-separated (TSV), semicolon-separated, or other custom delimiter formats, you'll need to replace delimiters with commas before using this converter.