{ JSON to CSV }

// convert JSON arrays to clean CSV in the browser

Convert JSON arrays to CSV instantly in the browser. Handles nested objects, arrays, flat JSON, custom delimiters, and BOM for Excel — free, no signup.

// OPTIONS
DELIMITER
JSON INPUT
CSV OUTPUT

CSV output appears here

Paste JSON and click Convert

HOW TO USE

  1. 01
    Paste JSON

    Paste any JSON array — flat objects, nested structures, or mixed types. The row and column count updates automatically as you type.

  2. 02
    Configure options

    Choose your delimiter (comma, tab, semicolon, pipe), toggle the header row, enable nested object flattening, and add a BOM byte for Excel compatibility.

  3. 03
    Copy or download

    Click "▶ Convert" — or type and it converts live. Preview the table, then copy the CSV or download as a .csv file.

FEATURES

Auto-detect columns Flatten nested objects 4 Delimiters BOM for Excel Table Preview Quote all fields Download .csv Free & No Signup

USE CASES

  • 🔧 Export API response data to Excel or Google Sheets
  • 🔧 Convert database JSON exports for BI tools
  • 🔧 Prepare JSON data for import into spreadsheet apps
  • 🔧 Convert log arrays to tabular format for analysis

WHAT IS THIS?

JSON to CSV converts JavaScript Object Notation arrays into Comma-Separated Values format. The tool auto-detects all unique keys across all objects in the array, handles nested objects by flattening them with dot notation, and correctly escapes fields containing the delimiter, quotes, or newlines. All processing happens in your browser.

RELATED TOOLS

FREQUENTLY ASKED QUESTIONS

What JSON structure does this accept?

The tool accepts a JSON array of objects — the most common structure returned by APIs and databases. Each object in the array becomes one row in the CSV. The union of all keys across all objects becomes the column set. Objects that are missing a key will have an empty cell in that column.

How are nested objects handled?

When "Flatten nested" is enabled, nested objects are flattened using dot notation. For example, {"address": {"city": "Paris"}} becomes a column named address.city with the value Paris. Nested arrays are serialised as a JSON string in a single cell. When flattening is disabled, nested values are kept as JSON strings.

Why add a BOM for Excel?

Excel does not reliably detect UTF-8 encoding unless the file begins with a Byte Order Mark (BOM) — a special three-byte sequence (0xEF 0xBB 0xBF). Without it, special characters (accents, currency symbols, emoji, CJK characters) may display as garbled text when opening the CSV. Enable this option if your data contains non-ASCII characters and you plan to open it in Excel.

When should I use a semicolon delimiter?

In many European countries, Excel uses a semicolon as the default CSV delimiter because commas are used as the decimal separator. If your CSV opens incorrectly in Excel with all data in one column, try switching to semicolon delimiter — this is especially common for users in Germany, France, Italy, Spain, and other EU countries.

How are fields with commas or quotes escaped?

Per RFC 4180, any field containing the delimiter character, a double quote, or a newline is wrapped in double quotes. Any existing double quote within such a field is escaped by doubling it — " becomes "". This ensures the CSV can be correctly parsed by any compliant CSV reader without data loss.

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

Yes. If you paste a single JSON object (not wrapped in an array), the tool automatically wraps it in a single-element array and produces a one-row CSV with the object's keys as column headers. Useful for converting a single API record to a spreadsheet row.

JSON to CSV Converter — Export JSON Arrays to Spreadsheets

APIs almost universally return data as JSON arrays of objects — but spreadsheet tools, business intelligence software, and data analysts typically work with CSV. Converting between the two formats should take seconds, not involve writing a Python script or installing a package. This tool handles the conversion entirely in the browser.

Handling Inconsistent Schemas

Real-world JSON is often messy — not every object in an array has the same keys. The converter handles this gracefully by computing the union of all keys across all objects. Objects missing a particular key simply produce an empty cell in that column. This means heterogeneous API responses convert cleanly without data loss.

Flattening Nested JSON

Nested JSON objects are a common challenge when converting to CSV format. A flat table has no natural representation for objects within objects. The flattening algorithm recursively walks nested objects and builds column names from the key path: user.address.city, user.address.country. Nested arrays are serialised to JSON strings rather than expanded, keeping the table structure manageable.

CSV Delimiters and Compatibility

Despite the name, Comma-Separated Values files are not always comma-separated. Tab-separated files are widely used for data interchange because tabs almost never appear in data values. Pipe-separated files are common in legacy systems. Semicolons are standard in European Excel installations. This tool supports all four delimiters, letting you match the format expected by your target application.