JSON to CSV Converter — Free, Instant, No Upload

This JSON to CSV converter turns JSON arrays of objects into spreadsheet-ready CSV files instantly. Nested objects are flattened with dot notation and arrays within objects are joined with semicolons. All conversion runs entirely in your browser using native JavaScript. Your JSON never leaves your device. Paste a JSON array on the left and download or copy the CSV on the right.

How JSON to CSV Conversion Works

JSON arrays of objects map naturally to the tabular structure of CSV. Each object in the array becomes one row, and the union of all keys across all objects becomes the set of column headers. The converter collects every unique key found across all objects, orders them consistently, then iterates through the array writing one CSV row per object. If an object is missing a key that other objects have, that cell is written as empty — ensuring the CSV grid is always rectangular even when objects have sparse or inconsistent keys.

Nested object flattening: Real-world API responses rarely consist of flat key-value pairs. The converter handles nested objects by flattening them with dot notation — a nested field { "address": { "city": "Austin" } } becomes a column named address.city. Arrays within objects are serialized to semicolon-separated strings so their values are preserved in a single cell without adding extra columns.

CSV escaping: Values that contain commas, double quotes, or newlines are wrapped in double quotes per RFC 4180. Double quotes within values are escaped by doubling them. This ensures the output opens correctly in Excel, Google Sheets, LibreOffice Calc, or any standards-compliant CSV reader without data corruption or column misalignment.

Worked Example: Converting a User List API Response

A developer exports a list of users from an API and needs to import them into a spreadsheet. The JSON response looks like this:

[
  { "name": "Alice", "email": "alice@example.com", "age": 30, "address": { "city": "Austin" } },
  { "name": "Bob",   "email": "bob@example.com",   "age": 25, "address": { "city": "Denver" } }
]

The converter produces this CSV output, ready to open directly in Excel or Google Sheets:

name,email,age,address.city
Alice,alice@example.com,30,Austin
Bob,bob@example.com,25,Denver

The nested address.city field is flattened into its own column using dot notation. The developer can import this CSV into Google Sheets via File → Import, open it in Excel, load it into a pandas DataFrame with pd.read_csv(), or import it into any database using a bulk import tool. This workflow is standard for reporting dashboards, data analysis tasks, sharing structured data with non-technical stakeholders, and seeding databases from API exports.

Key Factors: Flat vs. Nested JSON, Edge Cases

Flat JSON — arrays of simple key-value objects with no nesting — converts to CSV with no ambiguity. Each key maps to a column, each object maps to a row. This covers the majority of data export and reporting use cases.

Deeply nested JSON produces long dot-notation column names that can become unwieldy in a spreadsheet. If the nesting is more than 2–3 levels deep, consider whether a full CSV conversion is the right output format or whether the data should be restructured before converting. For deeply nested structures, the JSON Tree Viewer can help you understand the shape of the data before deciding on a conversion strategy.

Array values within objects are serialized as semicolon-separated strings. This preserves the data in a single cell but loses the array structure. If you need to query array elements as separate rows or columns, pre-process the JSON to normalize the arrays before converting — for example, exploding each tag in a tags: ["a", "b"] field into separate rows.

Null and missing values produce empty CSV cells. This is the correct behavior for most spreadsheet imports, where an empty cell represents an absent value. If your downstream tool requires explicit null strings, pre-process the JSON to replace null values with the string "null" before converting.

Frequently Asked Questions

How do I convert JSON to CSV?

Paste a JSON array of objects into the left panel. The converter extracts all unique keys as CSV column headers and maps each object to a row. Click Download .csv to save the result, or Copy to copy it to your clipboard.

What JSON structure works with this converter?

The input must be a JSON array of objects: [{...}, {...}, ...]. Each object becomes one row in the CSV. Keys across all objects are merged into a unified set of column headers — if an object is missing a key, that cell is left empty.

How are nested JSON objects handled in CSV?

Nested objects are flattened using dot notation. For example, {"user": {"name": "Alice", "age": 30}} becomes two columns: user.name and user.age. Arrays within objects are joined with semicolons: {"tags": ["a","b"]} becomes tags = "a;b".

Can I open the CSV in Excel?

Yes. The output is standard RFC 4180 CSV with comma delimiters and double-quote escaping. You can open it directly in Excel, Google Sheets, or any spreadsheet application. Values that contain commas or quotes are properly enclosed in double quotes.

Is there a size limit for JSON to CSV conversion?

No hard limit — conversion happens entirely in your browser with no upload. Very large arrays (hundreds of thousands of rows) may be slow depending on your device. For typical API responses and data exports, conversion is instantaneous.