JSON to CSV Converter
Convert a JSON array of objects to CSV — union headers, custom delimiter, proper quoting, all in your browser.
About the JSON to CSV Converter
The JSON to CSV Converter turns a JSON array of objects into clean, spreadsheet-ready CSV. Paste an array like [{"name":"Ada"},{"name":"Alan"}], choose a delimiter, and the tool builds a proper CSV table — deriving the header row from the union of every key it finds, so rows that are missing a field simply get an empty cell instead of shifting columns out of alignment. Everything runs directly in your browser using JavaScript, so nothing you paste is uploaded, stored, or logged, and the conversion happens the instant you click Convert.
CSV remains the universal language of spreadsheets, databases, and data pipelines. Excel, Google Sheets, Numbers, and nearly every analytics or import tool speaks it fluently, while JSON is what APIs and applications hand you. Bridging the two by hand is tedious and error-prone: you have to reconcile inconsistent keys, quote the fields that contain commas or line breaks, and escape the quotes that appear inside values. This tool does all of that for you, following the standard CSV quoting rules so the output opens cleanly in any spreadsheet without mangled rows or split cells.
How to use
- Paste your JSON into the Input box. It must be a JSON array whose items are objects — for example
[{"id":1,"name":"Ada"},{"id":2,"name":"Alan","city":"London"}]. Objects can have different keys; the tool merges them. - Choose a delimiter — comma, semicolon, or tab. Comma is the classic CSV default; semicolon suits locales where the comma is a decimal separator; tab produces TSV, handy for pasting straight into a spreadsheet.
- Decide on the header row. Leave "Include header row" checked to emit column names on the first line, or uncheck it to output data rows only.
- Click Convert to CSV. The result appears in the read-only Output box, and a confirmation shows how many rows and columns were produced.
- Copy the output with the Copy button, or Download .csv to save it as a
data.csvfile you can open directly in Excel or Sheets. - Click Clear to empty both boxes and start fresh.
If the input isn't a JSON array of objects, the Output box stays empty and an inline message explains what went wrong — invalid JSON, a non-array value, an empty array, or items that aren't objects. Fix the input and convert again.
Frequently asked questions
Is my data uploaded or stored anywhere?
No. All parsing and conversion happen locally in your browser with JavaScript. Your JSON is never sent to a server, saved, or logged. Close the tab and it's gone — which makes the tool safe for internal exports, customer records, or any sensitive payload.
How are the CSV columns determined?
The header is the union of every key across all objects, in the order the keys are first encountered. If one object has a city field that others lack, city still becomes a column, and the objects without it get an empty cell in that position. This keeps every row aligned to the same set of columns.
How does it handle commas, quotes, and line breaks inside values?
It follows the standard CSV quoting rules. Any field containing your chosen delimiter, a double quote, or a newline is wrapped in double quotes, and any double quotes inside the value are doubled (" becomes ""). Fields without special characters are left unquoted, so the output stays readable.
What happens to nested objects or arrays in a value?
Nested objects and arrays are serialized back to a compact JSON string inside their cell (for example {"a":1} or [1,2,3]). That single cell is then quoted and escaped like any other field, so complex values survive intact and won't break the row.
Why do I get an error about "an array of objects"?
CSV is a flat table, so the tool needs a top-level array where each item is an object (a set of key/value pairs). A single object, a bare number or string, an empty array, or an array of arrays can't map cleanly to rows and columns, so the tool asks you to reshape the input first.
Which delimiter should I choose?
Use comma for standard CSV that opens in most tools. Choose semicolon if your spreadsheet's locale treats the comma as a decimal mark, which otherwise splits numbers incorrectly. Pick tab to produce TSV, which pastes cleanly into a spreadsheet cell grid and avoids delimiter clashes when your data is full of commas.