Accueil JSON to CSV

JSON to CSV

Convert JSON arrays to CSV format instantly — handles quoting and special characters, 100% in your browser.

Input

Output

Original
Result
Type

What is JSON to CSV conversion?

JSON to CSV conversion transforms a JSON array of objects into a flat, comma-separated table. The converter takes the keys from the first object as column headers, then writes each object as a row with values in the same order. This produces a standard CSV file that can be opened in any spreadsheet application.

The conversion works best when the JSON is an array of flat objects (objects without nested arrays or objects). If an object has nested values (like arrays or sub-objects), they are converted to their string representation. This is because CSV is a flat format that cannot represent hierarchical data — each cell must be a single value.

When JSON meets CSV

JSON and CSV are complementary formats. JSON is the standard for web APIs, configuration files, and modern applications, while CSV is the standard for spreadsheets, data export, and tabular data analysis. Converting JSON to CSV bridges the gap between modern web technologies and traditional data tools.

The converter automatically handles CSV quoting rules: any value that contains a comma, double quote, or newline is enclosed in double quotes, and double quotes within values are escaped by doubling them. This ensures the resulting CSV is valid and can be parsed correctly by any CSV reader.

When to convert JSON to CSV

Converting JSON to CSV is useful in many scenarios:

  • Data export. Export JSON data from an API or database to a CSV file for analysis in Excel or Google Sheets.
  • Reporting. Generate CSV reports from JSON data for business intelligence tools.
  • Data sharing. Share JSON data with non-technical users who prefer spreadsheet format.
  • Backup and archival. Convert JSON configuration or data files to CSV for long-term storage.
  • Import to databases. Transform JSON data into CSV for import into relational databases or data warehouses.

How to convert JSON to CSV

Converting JSON to CSV with this tool takes a second and happens entirely in your browser. Follow these steps:

  1. Paste your JSON. Enter a JSON array of objects in the input box. A single object is also accepted and will be treated as a one-row array.
  2. Click "Convert". The converter extracts keys from the first object as headers, then writes each object as a CSV row.
  3. Copy or download. Click "Copy" to copy the CSV to your clipboard, or "Download" to save it as a .csv file.

The resulting CSV uses commas as separators and follows RFC 4180 quoting rules. Values containing commas, quotes, or newlines are automatically quoted.

Limitations and tips

The converter uses the keys from the first object in the array as column headers. If later objects have additional keys not present in the first object, those values will be missing from the CSV. For best results, ensure all objects in the array have the same set of keys.

Nested objects and arrays are converted to their JSON string representation (e.g., [1,2,3] becomes "[1,2,3]"). If you need to flatten nested data, consider preprocessing your JSON to extract the fields you need before converting. Also note that null values become empty strings, and numbers and booleans are converted to their string representations.

Is this JSON to CSV converter free?

Yes, completely free with no sign-up, no limits beyond your device's memory, and no upload.

Does it handle nested objects?

Nested objects and arrays are converted to their JSON string representation. CSV is a flat format, so deeply nested data should be flattened before conversion for best results.

What if my objects have different keys?

The converter uses the keys from the first object as headers. If later objects have additional keys, those values will be missing from the CSV. Ensure all objects have the same keys for best results.

Is my data uploaded?

No. All conversion is local. Your JSON data never leaves your browser.