All Tools
Categories
XML Tools 64 Email Marketing Tools 55 Import-Export Tools 50 JSON Tools 44 Number Tools 34 Text Tools 13 Shipping Freight Tools 5 Calculator 4
About Contact Privacy

JSON to CSV Converter

Convert a JSON array of objects into a clean CSV file instantly. Automatic column detection, proper quoting for commas and quotes, and one-click copy or download. Free, private, runs entirely in your browser.

JSON Input
CSV Output
Conversion runs entirely in your browser. Nothing is uploaded or stored. Nested objects/arrays inside a value are stored as a JSON string in that cell.

About JSON to CSV Converter

JSON to CSV Converter turns a JSON array of objects into a properly formatted CSV file that opens cleanly in Excel, Google Sheets, or any spreadsheet tool. It automatically detects every unique key across your objects to build the column headers, aligns rows even when some objects are missing certain keys, and applies correct CSV quoting for values containing commas, quotes, or line breaks.

This is the format developers reach for when exporting an API response, a database query result, or any list of records into something a non-technical teammate can open directly in a spreadsheet.

Features

  • Automatic column detection: Every unique key across your JSON objects becomes a column, in the order first encountered.
  • Handles sparse and nested data: Missing keys become empty cells; nested objects and arrays are safely stringified rather than dropped.
  • RFC 4180 quoting: Commas, quotes, and line breaks inside values are escaped correctly so the file opens cleanly in any spreadsheet app.
  • Instant, in-browser conversion: No upload, no server round trip, no account.
  • Copy or download: Grab the CSV text directly or download it as a .csv file.

How to Use

  1. Paste a JSON array of objects into the input box, or click "Load Sample" to see an example.
  2. Click Convert to generate the CSV output.
  3. Review the columns — every unique key across your objects becomes a header.
  4. Copy the CSV or download it as a .csv file to open in Excel or Google Sheets.

Examples

Example 1: A JSON array of three user records with name, email, and role fields converts to a four-line CSV — one header row and three data rows — ready to open directly in Excel.

Example 2: A product export where some items have a "discount" field and others do not still produces a clean, aligned CSV, with an empty cell in the discount column for products that lack that field.

Benefits

  • Spreadsheet-ready exports: Turn an API response or database export into something non-technical teammates can open directly.
  • No column mismatches: Automatic key detection keeps every row aligned even with inconsistent objects.
  • Safe for messy data: Proper quoting prevents commas or quotes in your data from breaking the file structure.
  • 100% private: Nothing is uploaded — conversion runs locally in your browser.

Frequently Asked Questions

What kind of JSON can this tool convert to CSV?
It works best with a JSON array of flat objects, such as [{"name":"A","age":30},{"name":"B","age":25}], since each object becomes one CSV row and each unique key becomes a column. A single JSON object is also accepted and converted into a one-row CSV.
What happens to nested objects or arrays inside my JSON?
Since CSV is a flat, tabular format, any value that is itself an object or array is converted to its JSON string representation and placed in a single cell, so no data is silently dropped, though it will not be split into further columns.
What happens if my objects have different keys?
The tool collects every unique key across all objects to build the column list. Rows that are missing a given key simply get an empty cell in that column, so the output stays a valid, aligned table.
How are commas, quotes, and line breaks inside values handled?
Any field containing a comma, a double quote, or a line break is automatically wrapped in double quotes, with internal quotes doubled, following standard CSV (RFC 4180) escaping rules so the file opens correctly in Excel, Google Sheets, or Numbers.
Will the CSV open correctly in Excel?
Yes. The output uses standard comma-separated, double-quote-escaped CSV formatting with CRLF line endings, which Excel, Google Sheets, and virtually every spreadsheet tool read correctly.
Does converting to CSV change my data types?
CSV has no native types — every value becomes text. Numbers and booleans are written out as their plain text representation (for example true or 42), and most spreadsheet tools will automatically re-detect them as numbers or booleans when the file is opened.
Is my data uploaded anywhere?
No. Conversion happens entirely in your browser using JavaScript. Your JSON never leaves your device or gets sent to a server.