JSON to CSV Converter
Convert a JSON array of objects or arrays to CSV. Flattens nested objects with dot notation, with custom delimiter and spreadsheet-safe export.
Processed locally in your browser. Your files are not uploaded.
What this tool does
Paste JSON or drop a .json file and get a CSV you can open in Excel, Google Sheets or load into a database. The usual input is an array of objects, such as an API response; every distinct key becomes a column, in the order first seen, and objects missing a key simply get an empty cell. Arrays of arrays, a single object and arrays of plain values are supported as well.
Real-world JSON is nested, so the tool flattens it. With dot notation, {"user":{"name":"Ann"},"tags":["a","b"]} becomes the columns user.name, tags.0 and tags.1, and you can change the separator. If you would rather keep the structure, choose to write nested values as JSON strings inside a single cell instead.
Export options cover what spreadsheets need: comma, semicolon, tab or pipe delimiters, a header row on or off, quoting every field, Windows line endings, and a UTF-8 BOM so Excel shows accents correctly. A CSV-injection guard can prefix cells starting with =, +, - or @ with an apostrophe, so a malicious value in the data is not executed as a formula when the file is opened. Invalid JSON is reported with the line and column where possible.
How to use it
- 1Paste JSON into the box or drop a .json file.
- 2Choose how nested data is handled (dot notation or JSON text) and the delimiter.
- 3Set header, quoting, line-ending, BOM and CSV-injection options. Small inputs convert as you type; press Convert for large files.
- 4Check the preview table and any warnings, then Copy or Download the CSV.
Supported formats
Input: JSON text or a .json file (array of objects, array of arrays, array of values, or one object). Output: CSV (.csv) with a delimiter of your choice.
Privacy
This tool runs in your browser. The data you provide is processed on your device and is not sent to our servers.
Limitations
- The JSON must be valid. Comments, trailing commas and JSON Lines (one object per line) are not accepted.
- Items that do not match the first item's shape (for example a number inside an array of objects) are skipped and listed as warnings.
- Flattening can create many columns when objects have varied keys, and arrays inside objects create one column per index.
- The injection guard changes the data (adds an apostrophe) and leaves plain numbers such as -5 untouched. Turn it on for files that will be opened in spreadsheets, and off if the CSV feeds another program.
- Whole file is processed in memory; very large JSON may be slow. Files over 1 MB are converted in a background worker.
FAQ
How are nested objects and arrays handled?
By default they are flattened with dot notation: user.address.city, tags.0, tags.1. Switch to 'JSON text' to put each nested value into one cell as a JSON string.
What if my objects have different keys?
The columns are the union of all keys in the order they first appear. Objects that lack a key get an empty cell.
What is CSV injection?
A cell beginning with =, +, - or @ can be executed as a formula by Excel or Sheets. The protection option prefixes such cells with an apostrophe so they are shown as text.
Why do I need a BOM?
Excel on Windows guesses the encoding of CSV files and often garbles accents and non-Latin text unless the file starts with a UTF-8 byte-order mark. Other programs may not want it, so it is optional.
Related tools
CSV to JSON Converter
Convert CSV or TSV to JSON in your browser. Auto-detects the delimiter, handles quotes and BOM, and previews the first rows.
CSV Cleaner
Clean CSV files: trim spaces, remove empty and duplicate rows, tidy column names, filter, sort and drop columns. See exactly what changed.
Markdown to HTML
Convert Markdown (GitHub-flavoured) to clean HTML with a live preview. Copy or download the result, entirely in your browser.
HTML to Markdown
Convert HTML to tidy Markdown, including tables, lists and code blocks. Scripts and styles are dropped. Runs in your browser.