JSON to CSV Converter Online
Turn a JSON array of objects into a CSV file you can open in Excel or Google Sheets, or import a CSV and get JSON back. The conversion happens in your browser, so your data stays with you.
How to convert JSON to CSV
- Paste your JSON into the editor. It should be an array of objects.
- Open the Export menu and choose CSV (arrays).
- A file named
data.csvdownloads. Open it in a spreadsheet.
For example, [{"id":1,"name":"Ada"},{"id":2,"name":"Grace"}] becomes a header row id,name followed by one row per object.
What shape of JSON works best
CSV is flat, so the tool works best with an array of flat objects, like rows from an API or database. A few details:
- The header row is the union of all keys in all objects. If an object lacks a key, its cell is left empty.
- Values containing commas, quotes, or line breaks are quoted, and quotes inside them are doubled, following standard CSV rules.
nullbecomes an empty cell.- Nested objects and arrays are not flattened. Flatten them first, or remove those fields with the tree viewer's field filter before exporting.
If your JSON is a single object, it is exported as one row. If it is not an object or array of objects, you are told that CSV export works best with arrays of objects.
Convert CSV to JSON
Use the CSV button in the toolbar to import a .csv file. The first row is used as keys, and each following row becomes an object. Empty cells and null become null, and true and false become booleans. Then use Format to tidy the result.
Other export formats
The same menu exports formatted or minified JSON, YAML, TOML, and SQL INSERT statements. Need to shrink JSON instead? See the JSON minifier.
More JSON tools
- Format JSON: formatter, validator, tree viewer and diff.
- JSON Prettier: pretty print JSON and repair invalid JSON.
- JSON Validator: check JSON syntax and find errors.
- JSON Diff: compare two JSON documents.
- JSON to YAML: convert JSON to YAML.
- JSON Minifier: minify JSON and remove whitespace.
- JWT Decoder: decode and inspect JSON Web Tokens.
- Common JSON Errors: causes and fixes for invalid JSON.
Frequently asked questions
How do I convert JSON to CSV?
Paste a JSON array of objects, open the Export menu, and pick CSV. A data.csv file downloads.
Can it handle nested JSON?
Not automatically. Nested objects and arrays are not flattened, so flatten them first or hide those fields before exporting.
Can I convert CSV to JSON?
Yes. Use the CSV import button. The first row becomes the keys and each row becomes an object.
Will it open in Excel?
Yes. The file is standard comma-separated text that Excel and Google Sheets can open.
Is my data uploaded?
No. The conversion runs entirely in your browser.