JSON → CSV

Convert JSON arrays to CSV. Handles nested values, commas in strings, and special characters automatically.

JSON input
CSV output3 rows · 3 cols
name,age,city
Alice,30,Jakarta
Bob,25,Bandung
Carol,35,Surabaya

How JSON to CSV Conversion Works

JSON (JavaScript Object Notation) is the de facto standard for API responses and data interchange. This tool converts a JSON array of objects into a clean CSV file that can be opened in any spreadsheet application like Excel, Google Sheets, or LibreOffice Calc.

Conversion Example

JSON InputCSV Output
[ {"name":"Alice","age":30}, {"name":"Bob","age":25} ]name,age Alice,30 Bob,25

Handling Complex JSON Structures

Real-world JSON data often contains nested objects, arrays, and mixed types. The converter handles these cases intelligently:

  • Nested objects: Flattened with dot notation (address.city)
  • Arrays: Serialized as JSON strings in the CSV cell
  • Null values: Represented as empty cells
  • Boolean values: Converted to true / false strings
  • Special characters: Fields containing commas or quotes are automatically double-quoted per RFC 4180

Frequently Asked Questions

How does JSON to CSV conversion work?

The converter takes a JSON array of objects, extracts all unique keys as CSV column headers, and maps each object to a row. Values are properly escaped and quoted when they contain commas, quotes, or newlines.

How are nested JSON objects handled?

Nested objects are flattened using dot notation. For example, {"address": {"city": "NYC"}} becomes a column named "address.city" with the value "NYC". Arrays are serialized as JSON strings.

What if objects have different keys?

The converter collects all unique keys across all objects in the array. If an object is missing a key, the corresponding CSV cell is left empty. This ensures all data is preserved without data loss.

Is my data sent to a server?

No. All conversion runs entirely in your browser using JavaScript. Your data never leaves your device, making it safe for sensitive or proprietary JSON data.

Can I import the CSV into Excel or Google Sheets?

Yes. The output follows the standard RFC 4180 CSV format, which is compatible with Excel, Google Sheets, LibreOffice Calc, Numbers, and virtually all spreadsheet and database software.