Back to All Tools

JSON to CSV Converter

Convert JSON array of objects to CSV and CSV back to JSON. Support nested object flattening, custom delimiter, and BOM for Excel compatibility.

Input: 0 chars
Output: 0 chars
Rows: 0
Columns: 0
Conversion: JSON → CSV

About JSON to CSV Converter

Our free online JSON to CSV Converter is a powerful utility that transforms JSON arrays of objects into CSV format and vice versa. This bidirectional conversion tool is essential for data analysts, developers, and anyone who needs to work with tabular data across different formats and applications.

The JSON to CSV conversion handles flat and nested objects. When flattening is enabled, nested objects like `{"address": {"city": "NY"}}` become `address.city: "NY"` in the CSV output. Arrays are serialized as JSON strings within the CSV cell. The tool automatically detects all unique keys across all objects to generate a complete set of column headers.

The CSV to JSON conversion parses CSV data with proper handling of quoted fields, escaped characters, and multi-line values. It reconstructs the JSON structure from the CSV rows, with options to preserve or unflatten dot-separated keys back into nested objects. The output is a clean array of JSON objects ready for use in APIs, databases, or applications.

All processing happens directly in your browser, so your data never leaves your device. This ensures complete privacy and security for your sensitive data, including customer information, financial records, and confidential datasets.

Features

Bidirectional Conversion

Convert JSON to CSV and CSV back to JSON with a single click. Perfect for data transformation workflows.

Nested Object Flattening

Automatically flatten nested JSON objects into dot-separated CSV column headers for tabular representation.

Custom Delimiters

Choose from comma, semicolon, tab, or pipe delimiters to match your target application's CSV requirements.

Excel BOM Support

Include a Byte Order Mark (BOM) in the output CSV for proper UTF-8 encoding display in Microsoft Excel.

Header Row Control

Optionally include or exclude the header row in the CSV output for flexible data export options.

Copy & Download

One-click copy to clipboard or download the converted data as a file for local use.

Auto-Convert

Enable auto-convert mode to transform your data automatically as you type in real-time.

Statistics

View input/output character counts, row count, and column count for quick data overview.

Privacy First

All conversion happens in your browser. Your data never leaves your device, ensuring complete security.

How to Use

1

Paste Your Data

Paste JSON array of objects or CSV data into the left input editor. Click "Sample JSON" or "Sample CSV" to load example data.

2

Configure Options

Choose your delimiter, nested key separator, and whether to flatten nested objects or include a header row.

3

Convert

Click "JSON to CSV" or "CSV to JSON" to perform the conversion. The result appears in the right output editor.

4

Copy or Download

Click Copy to copy the converted data to clipboard, or Download to save it as a file (.csv or .json).

Frequently Asked Questions

What JSON format does this tool expect?

The tool expects a JSON array of objects, where each object represents a row and each key represents a column. For example: `[{ "name": "John", "age": 30 }, {"name": "Jane", "age": 25}]`. If your JSON is a single object or a nested structure, you may need to restructure it first. The tool handles objects with different keys - columns are generated from all unique keys across all objects.

How does nested object flattening work?

When flattening is enabled, nested objects are converted to flat key paths. For example, `{"user": {"name": "John", "address": {"city": "NY"}}}` becomes `{"user.name": "John", "user.address.city": "NY"}`. The dot separator can be changed to an underscore in the settings. Arrays within nested objects are serialized as JSON strings in the CSV cell.

What is BOM and why would I need it?

BOM (Byte Order Mark) is a special Unicode character (`U+FEFF`) placed at the beginning of a file to signal that the file is encoded in UTF-8. Microsoft Excel requires a BOM to correctly display non-ASCII characters (like accented letters, Chinese characters, etc.) in CSV files. If you're having issues with special characters in Excel, enable the BOM option.

Can it handle CSV with commas inside quoted fields?

Yes, the CSV parser properly handles RFC 4180 compliant CSV data. This means quoted fields can contain commas, newlines, and double quotes (escaped as `""`). The parser correctly distinguishes between field delimiters and commas that are part of field values, ensuring accurate conversion back to JSON.

Is this JSON to CSV converter free?

Yes, it is completely free to use with no registration, sign-up, or limits. You can use it as many times as you need for personal, educational, or commercial projects without any restrictions.

Does it work offline?

Yes, once the page is loaded, all JSON and CSV conversion happens entirely in your browser using JavaScript. No server communication is needed, so you can use it even without an internet connection after the initial page load.

Can it handle large datasets?

Yes, this tool can handle large datasets efficiently. Since all processing is done client-side, the performance depends on your device's capabilities. For very large datasets (hundreds of thousands of rows), conversion may take a few extra moments, but the results are just as accurate.

How are arrays handled in JSON to CSV conversion?

When a JSON object contains an array value (not an array of objects), the array is serialized as a JSON string in the CSV output. For example, `{"tags": ["a", "b", "c"]}` becomes a CSV cell containing `["a","b","c"]`. This preserves the array data while maintaining valid CSV structure. If you have an array of objects, each object becomes a separate row.

Is my data secure?

Absolutely. All JSON and CSV conversion happens directly in your browser using JavaScript. Your data is never sent to any server, stored, or logged. This ensures complete privacy and security for sensitive information like customer data, financial records, and confidential datasets.