JSON to CSV Converter — No Upload, Instant, Free
Convert a JSON array of objects into CSV ready for Excel, Google Sheets, or any spreadsheet. Keys become columns, values are quoted and escaped automatically. Everything runs in your browser — no upload, no account, no logs.
How to use this tool
- Paste your JSON array into the input field.
- Preview the flattened CSV output.
- Copy or download the CSV.
About JSON to CSV
This converter takes a JSON array of objects and turns it into comma-separated values you can open in Excel, Google Sheets, Numbers, or load with any CSV library. Paste an array such as [{"name":"Alice","age":30}] and the keys of each object become the column headers while the values fill the rows. The tool scans every object in the array first and builds a unified header from the union of all keys it finds, so even if some rows carry fields that others omit, every column still appears. Where an object lacks a key present elsewhere, that cell is simply left empty rather than throwing an error.
Escaping follows the conventions most spreadsheet software expects. Any value that contains a comma, a double quote, or a line break is wrapped in double quotes, and any literal double quote inside that value is doubled, so a cell reading 5"6 becomes "5""6". Values that are themselves objects or arrays are serialized back to compact JSON text and placed in a single cell, which keeps nested structures from breaking the row layout. Null and undefined values render as empty cells. The header row plus one line per array element is joined with newlines and shown in a scrollable panel with a live row count.
The input must be a top-level JSON array. If you paste a single object, a number, or malformed JSON, the tool reports a clear message rather than producing partial output, and it specifically calls out common mistakes like trailing commas or unquoted keys. An empty array is treated as valid and produces empty output with a row count of zero. Conversion runs entirely in your browser, so the data you paste is never uploaded.
It is well suited to exporting API responses, log dumps, or config fragments into a format a non-technical colleague can open, and to preparing data for import into tools that only accept CSV. Because the flattening is shallow, deeply nested JSON is best reshaped into flat records before conversion if you want each field in its own column.
Frequently Asked Questions
- What JSON shape does the tool expect?
- A top-level array of objects, for example [{"name":"Alice","age":30},{"name":"Bob","age":25}]. The keys of those objects become the CSV column headers and each object becomes one row. A bare object, a string, a number, or anything that is not an array is rejected with an explanatory message.
- How are rows with different sets of keys handled?
- The tool reads every object in the array and merges all the keys it encounters, in first-seen order, into a single header row. If a particular object is missing one of those keys, the corresponding cell in that row is left blank. No row is dropped and no key is silently discarded.
- How does it escape commas, quotes, and newlines?
- Any cell value containing a comma, a double quote, or a line break is enclosed in double quotes, and any double quote inside the value is escaped by doubling it. This is the standard CSV quoting that Excel, Google Sheets, and most CSV parsers understand, so values with punctuation survive a round trip intact.
- What happens to nested objects and arrays inside a row?
- If a value is itself an object or an array, it is converted back to compact JSON text and stored in a single cell rather than being expanded into more columns. The flattening is shallow by design. If you need each nested field in its own column, reshape the JSON into flat records before pasting it.
- How are null, undefined, and missing values represented?
- Null and undefined values become empty cells, as do keys that a given object does not contain. This keeps the column count consistent across every row even when the source data is irregular.
- What does an empty array produce?
- An empty array is considered valid input. The tool reports a row count of zero and produces no CSV body, rather than treating it as an error. This makes it safe to feed in programmatically generated arrays that may sometimes be empty.
- Why am I seeing an invalid JSON error?
- The text you pasted could not be parsed as JSON. The most common causes are trailing commas after the last element, single quotes instead of double quotes, unquoted object keys, or a stray character copied from a code editor. Fixing those usually resolves the error.
- Is my data uploaded anywhere?
- No. The JSON is parsed and converted to CSV entirely inside your browser, so nothing you paste is sent to a server.
Embed this tool on your site
Free. One line of HTML — the tool runs in your visitor's browser, no data sent to anyone.
<iframe src="https://brevio.pro/embed/json-to-csv" width="100%" height="600" loading="lazy" style="border:1px solid #e5e5e5;border-radius:8px" title="JSON to CSV — brevio"></iframe> <p style="font:12px/1.4 sans-serif"><a href="https://brevio.pro/tools/json-to-csv">JSON to CSV</a> by <a href="https://brevio.pro">brevio</a></p>