JSON to CSV

Convert JSON arrays and objects to CSV with a custom delimiter, quote character, and newline style. Supports nested object flattening, header row toggle, and CSV file download.

json csv convert export data
Free Client-Side Private
🔒 This tool runs entirely in your browser — your files are never uploaded to any server.

The JSON to CSV Converter is a free, browser-based tool that transforms JSON arrays and objects into comma-separated values format. Paste any valid JSON, configure your delimiter and quoting options, and download a ready-to-use CSV file in seconds. All processing runs entirely in your browser — nothing is uploaded.

Features

Feature Detail
Delimiter selection Choose comma, semicolon, tab, or pipe as the column separator
Quote character Wrap values in double quotes, single quotes, or output unquoted values
Newline style CRLF (Windows) or LF (Unix/Mac) line endings
Header row Optionally include or omit the column name header row
Nested object flattening Converts {"address":{"city":"London"}} into a address.city column
Array handling Nested arrays are serialised as a JSON string in a single cell
RFC 4180 quoting Values containing delimiters, quote chars, or newlines are automatically quoted and escaped
Copy to clipboard Copy the full CSV output with one click
Download CSV Save the result as output.csv directly from the browser
File load Load a .json or .txt file without leaving the page
Stats bar Shows row count, column count, and CSV file size after conversion

How to Use

  1. Paste a JSON array or object into the JSON input area, or click Load to open a file.
  2. Configure your options: delimiter, quote character, newline style, header row, and flatten toggle.
  3. Click Convert to CSV.
  4. Review the result in the CSV output area.
  5. Click Copy to copy to the clipboard, or Download to save output.csv.

Input Format

The tool accepts any valid JSON value:

  • Array of objects (the standard case): each object becomes one CSV row, and all keys across all objects become columns.
  • Single object: treated as a single-row array.
  • Array of primitives: each value is placed in a single value column.

Missing keys are output as empty cells so that jagged arrays (objects with different key sets) are handled correctly.

Nested Object Flattening

When the Flatten nested objects option is enabled, nested objects are expanded into dot-notation column names:

Input:  {"user": {"name": "Alice", "age": 30}, "active": true}
Output columns: user.name, user.age, active

Arrays nested inside objects are not recursively expanded; they are serialised as a JSON string in a single cell. Disable flattening if you want to keep nested structures as raw JSON strings instead.

Delimiter and Quoting

CSV is not a strictly standardised format, and different applications expect different settings:

Application Recommended settings
Microsoft Excel (English) Comma delimiter, CRLF newlines
Microsoft Excel (European) Semicolon delimiter, CRLF newlines
Google Sheets Comma delimiter, either newline style
R / Python pandas Comma or tab delimiter, LF newlines
Database import tools Tab delimiter (TSV), LF newlines

The None quote option outputs values without any quoting. In this mode, values that contain the delimiter character have the delimiter replaced with a space to prevent column misalignment.

Use Cases

Data Export from APIs

Many REST APIs return JSON responses. Use this tool to quickly convert an API response into a spreadsheet-friendly CSV for reporting, sharing with stakeholders, or importing into a database.

Configuration File Analysis

Export nested configuration files (package.json, app config) to CSV for side-by-side comparison or documentation purposes.

Database Imports

Database tools such as MySQL Workbench, pgAdmin, and SQLite DB Browser can import CSV files. Convert your JSON seed data or fixture files to CSV for bulk import.

Reporting and Dashboards

Business intelligence tools like Tableau, Power BI, and Looker Studio work best with flat CSV files. Use the flatten option to convert nested JSON structures from analytics APIs into importable tables.

Log File Processing

Structured JSON logs (from services like Winston, Bunyan, or cloud logging platforms) can be converted to CSV for easier filtering and analysis in a spreadsheet.

Data Migration

When migrating data between systems that use different formats, JSON to CSV is a common transformation step. This tool handles it client-side without needing a script or server.

Understanding the Column Order

Columns appear in the order that keys are first encountered as the tool scans the array from top to bottom. If the first object has keys id, name, email, those become the first three columns. Any new keys introduced by later objects are appended to the right. This matches the behaviour of most JSON-to-CSV libraries.

Frequently Asked Questions

What happens if my JSON objects have different keys?

The tool performs a union of all keys across all rows. If an object is missing a key that other objects have, the corresponding cell is left empty. No rows are dropped.

Does flattening work for deeply nested objects?

Yes. Flattening is applied recursively, so a.b.c.d produces a column named a.b.c.d. Arrays at any level of nesting are serialised as JSON strings rather than further expanded.

What is the difference between comma and semicolon delimiters?

Both produce valid CSV files. Microsoft Excel on systems with a European locale defaults to semicolon as the list separator, so files saved with a comma delimiter may not open correctly in those environments without manual import configuration. Use semicolon if your audience uses Excel in a European locale.

Why might values appear in the wrong column when I open the file in Excel?

This is almost always a delimiter mismatch. If Excel is set to expect semicolons and your CSV uses commas, all values will appear in a single column. Re-export with the semicolon delimiter, or change your Excel regional settings.

Can I convert a JSON object (not an array) to CSV?

Yes. A single JSON object is treated as a one-row array. The keys become column headers and the values become the single data row.

What does "RFC 4180 quoting" mean?

RFC 4180 is a widely referenced specification for the CSV format. It states that values containing the delimiter, the quote character, or line breaks must be enclosed in double quotes, and any double quotes within the value must be doubled. This tool follows this rule automatically.

Is there a file size limit?

There is no server-side limit because all processing happens locally in your browser. Very large files (tens of megabytes) may be slow depending on your device's performance, but they will not be rejected.

Report an issue