JSON to CSV Converter
Convert JSON arrays to CSV and CSV back to JSON with header detection.
When to convert JSON to CSV
JSON and CSV are the two most common data interchange formats, and conversion between them is a frequent task in data pipelines, analytics workflows, and reporting. CSV is preferred when data needs to be imported into spreadsheet applications like Excel or Google Sheets, loaded into SQL databases using LOAD DATA INFILE or COPY, or processed by data science tools like pandas or R that handle tabular data natively.
JSON-to-CSV conversion works best when the JSON is an array of flat objects — each object becomes a row, and the union of all objects' keys becomes the header row. When objects have different keys, this tool fills missing values with empty strings. Nested objects are flattened using dot notation (e.g., address.city). Arrays within objects are serialised as JSON strings within the CSV cell, since CSV cannot natively represent nested structure.
For the reverse operation (CSV to JSON), use our companion tool. For large datasets, consider streaming approaches rather than loading the entire file into memory — a 100 MB JSON file can easily become a 200 MB CSV.
Common mistakes
- Nested objects — CSV cannot represent hierarchical data. Nested JSON objects must be flattened or serialised, both of which lose structure. If you need the nesting, JSON, Parquet, or Avro are better formats.
- Special characters in values — CSV values containing commas, newlines, or double quotes must be enclosed in double quotes, with any internal double quotes escaped as two double quotes. Failing to quote these values breaks parsers.