Everyday AI Guides · Free Data Tool

JSON to CSV Converter — Free Online Tool

Convert JSON arrays, objects and common API responses into CSV. Keep fields from every record, flatten nested objects when needed, preview your columns, then copy or download the result.

No account · Local browser processing · Excel-friendly download

Accepts an array of objects, one object, or a common API wrapper such as {"data":[...]}. Browser processing only; use a small sample first for very large datasets.

Ready to convert. Your JSON stays in this browser while it is processed.

0 data rows · 0 columns

Before opening unknown data in a spreadsheet: The formula-protection option reduces common formula-injection risks but is not guaranteed across all spreadsheet apps or after re-saving. It may add a leading tab to potentially active text cells. Choose “Keep source values unchanged” only for trusted data or workflows that require exact raw values.

How to Convert JSON to CSV

  1. Paste valid JSON or select a local .json file. Start with a JSON object, an array of objects, or a recognized API response containing records.
  2. Choose how to handle nested objects and select the separator expected by your destination application.
  3. Click Convert JSON to CSV. The tool detects columns across all records instead of using only the first record's keys.
  4. Review the CSV and table preview. Copy the CSV text, or download a UTF-8 file to open or import in your spreadsheet software.

Example: JSON Records With Different Fields

Real exports may include a field in one record but not another. The converter combines fields across all rows so a later column is not silently dropped.

JSON input

[
  {"id":1,"name":"Ada"},
  {"id":2,"name":"Lin","email":"lin@example.com"}
]

CSV output

id,name,email
1,Ada,
2,Lin,lin@example.com

A missing property produces an empty CSV cell. JSON null also becomes an empty cell, so that distinction is not preserved in the CSV.

Nested JSON to CSV: Flatten or Keep as Text?

Flatten nested objects

Turn {"address":{"city":"Boston"}} into an address.city column. This is useful for comparing fields or filtering in a spreadsheet.

Keep nested JSON as text

Preserve a nested object or array inside one quoted CSV cell. Arrays remain JSON text in either mode to prevent unexpectedly multiplying rows.

Flattening limitation: When a literal key such as "address.city" conflicts with a nested path address.city, conversion stops with an error rather than silently overwriting data. Rename the conflicting source key or use the JSON-text option.

How Quotes, Commas, and Spreadsheet Formulas Are Handled

CSV fields containing separators, quotation marks or line breaks are quoted, and quotation marks inside them are doubled. That keeps a value such as "Austin, TX" in one cell when imported with the matching separator.

Untrusted values beginning with formula-like characters may be interpreted by spreadsheet programs. The default protection setting adds a tab to certain text values before CSV quoting; it does not change the original JSON input. This is a best-effort safeguard for spreadsheet viewing, not a substitute for validating external data or testing a particular spreadsheet workflow.

Common Conversion Problems and Fixes

“Invalid JSON”

Check for trailing commas, single-quoted keys or incomplete brackets. Valid JSON uses double quotes around property names and strings.

Unexpected blank cells

Check whether a property is missing or its value is null. Those cases become blank CSV cells in this tool.

Columns merge in Excel

Import the CSV using the same separator selected here; some regional settings use semicolons instead of commas.

Nested fields look different

Select flattening for separate dot-notation columns or JSON text to keep the original nested structure in one cell.

Related Designs24hr Tools

Use the appropriate next tool for the task instead of repeatedly converting the same data.

Frequently Asked Questions

Can I convert a JSON object instead of an array?

Yes. A single object becomes one CSV data row. The tool also recognizes common API wrapper keys such as data, results, items, and records when they contain arrays of objects.

Will columns that appear later in the JSON be included?

Yes. The converter collects unique fields from all records in their first-seen order. Fields missing from a particular record become empty cells.

Can the converter turn nested arrays into extra CSV rows?

No. Arrays are stored as JSON text inside a CSV cell; they are not expanded into additional records. Nested objects can be flattened into dot-notation columns if that option is selected.

Are JSON files uploaded to a server?

The converter reads selected files and processes JSON in the browser; it does not send the input to a conversion server. As with any website, only use sensitive data on a site and device you trust.

Why might Excel show garbled characters?

Use the UTF-8 BOM download option, or import the file as UTF-8. Encoding recognition can vary by application and version.

Does this converter preserve every JSON type?

No. CSV is a text table: objects may be flattened or stringified, arrays are JSON text, and null and missing values both become blank cells. Preserve the original JSON when exact types and structure matter.

Everyday AI Guides · designs24hr.com