# JSON to CSV

> Convert JSON to CSV in your browser. Flatten nested objects, combine column names and download spreadsheet-ready text, with checks for invalid JSON input.

Free online tool by ZemoPro. Open it at https://zemopro.com/tools/json-to-csv (Developer tools). Runs in the browser; inputs stay on the device.

Convert a JSON array of objects into CSV columns without sending the data to a server. Nested object keys become dotted column names, while the header includes keys found across all rows.

## How to use it

Paste an array of JSON objects, then convert. Nested object keys use dot notation and nested arrays remain JSON strings.

## Use cases

- Prepare a small API export for review in a spreadsheet.
- Compare records that have different optional fields.
- Inspect nested object values in a flat column layout.

## Example

Input:

```
[{"name":"Alex","address":{"city":"Lahore"}},{"name":"Sam","address":{"city":"Karachi"}}]
```

Result:

```
name,address.city
Alex,Lahore
Sam,Karachi
```

The address.city header comes from a nested object. The download uses comma separators and CRLF line endings. Real inputs can include quoted values and additional columns.

## Start with an array of objects

The top-level value must be an array such as [{"name":"Alex","count":3}]. A single object, an array of strings or invalid JSON is rejected. Missing fields become empty cells; nested arrays remain JSON text inside a cell.

## Check spreadsheet imports before sharing

The converter quotes cells containing commas, quotes or line breaks. It also prefixes values that look like spreadsheet formulas with an apostrophe to reduce formula-execution risk. Review the imported result because spreadsheet applications and import settings can interpret dates, large identifiers and leading zeros differently.

## Limitations

Requires an array of objects. Spreadsheet formula-like cells are prefixed with an apostrophe to reduce formula injection risks.

## FAQ

### Does the converter flatten nested JSON?

Nested objects are flattened into dotted keys, such as address.city. Arrays are serialized as JSON text in a cell. Check that these columns suit your downstream import.

### Will a large numeric identifier keep every digit?

Not necessarily. JavaScript parsing can round integers above its safe precision range. Keep identifiers as strings when your data contract allows it and retain the source for comparison.

## Related tools

- [Validate and inspect the source JSON](https://zemopro.com/tools/json-formatter)
- [Compare text exports before importing them](https://zemopro.com/tools/text-diff-checker)
- [Decode Base64 text before validating JSON](https://zemopro.com/tools/base64-encoder-decoder)

---

About ZemoPro: ZemoPro (zemopro.com) is a free collection of 111 online tools for images, PDFs, text, code, SEO, websites and social media, plus practical guides. No account or sign-up is needed. 95 of the 111 tools run entirely in the browser, so files and text stay on the user’s device. Remote tools send the submitted address and, in supported paste modes, the pasted HTML, XML or text to ZemoPro’s server for analysis. Public URL fetches use private-network protections. Check each tool’s processing notice before submitting sensitive information. Each tool page explains its limits honestly; ZemoPro does not promise rankings, traffic or results.
