JSON to CSV Converter
Flatten a JSON array of objects into CSV with delimiter and header controls.
Written by Golam Rabbani, Founder & Lead Engineer
How to use this json to csv converter
- Paste a JSON array of objects (or a single object) into the input box.
- Pick a delimiter — comma, semicolon, tab, or pipe.
- Choose whether to include a header row in the output.
- Press Convert to render the CSV.
- Copy the CSV or click Reset to clear the form.
About this json to csv converter
The JSON-to-CSV converter inspects the top-level value in your JSON, treats objects as rows, and gathers every unique key across the array to form the column order. Each cell is rendered as a CSV field, with strings, numbers, and booleans inserted as-is and nested objects or arrays JSON-encoded into a single quoted cell so no data is lost. Values that contain the chosen delimiter, double quotes, or line breaks are wrapped in quotes and have embedded quotes doubled, matching the rules in RFC 4180.
Because the conversion is purely client-side, you can paste an API response with personal data or commercial figures without sending it anywhere. The delimiter picker is useful when your spreadsheet defaults to a regional format (semicolons in many European locales) or when you need a tab-separated file for fast paste-into-Excel imports.
For example, the input [{"name":"Ada","age":36},{"name":"Linus","age":54}] with a comma delimiter and the header row enabled becomes: name,age Ada,36 Linus,54
Add a row with a comma inside a name like "Doe, Jane" and the converter quotes that single cell — "Doe, Jane" — so the column count stays correct.
FAQ
- What if my objects have different keys?
- The converter walks every object and collects the union of all keys for the header. Rows missing a key produce an empty cell so all rows have the same number of columns.
- How are nested objects and arrays handled?
- They are JSON-encoded into the cell and quoted so the CSV stays one row per object. That preserves the data but means downstream tools see a JSON string in those columns rather than nested structure.
- Does the output follow RFC 4180?
- Yes. Fields containing the delimiter, double quotes, or line breaks are wrapped in double quotes and embedded quotes are doubled. Lines are joined with \n.
- Can I convert a single JSON object?
- Yes. A single object is treated as a one-row table whose columns are the object's keys.
- Is my JSON sent to a server?
- No. Conversion runs entirely in your browser; nothing is uploaded.
- Why does my CSV not open cleanly in Excel?
- Most Excel locales expect a specific delimiter (often a semicolon in Europe). Try changing the delimiter to match your spreadsheet locale, or import the file via the Data > From Text wizard.