JSON to CSV Converter
Turn a JSON array of objects into a clean CSV. Runs entirely in your browser — no signup, no upload.
Drop your file here
Accepts JSON · Runs in your browser. Your file never leaves your device.
JSON is the lingua franca of APIs, but most spreadsheet tools, databases, and BI platforms still want CSV. This converter takes a JSON array of objects — the typical shape API responses come back in — and writes a CSV where each object becomes a row and each unique key becomes a column. Output is RFC 4180 compliant, so commas, quotes, and embedded newlines are escaped correctly.
Everything runs in your browser using the same engine SheetCompare's diff product is built on. No upload, no server, nothing sent anywhere. If your JSON shape is anything other than "array of flat objects," read the FAQ below — there's nuance.
Three steps, no signup
- 1
Drop your JSON file
Drag a .json file into the box above, or click to pick one. The file should contain an array of objects at the top level.
- 2
Headers are derived from your keys
We scan every object and collect the union of all keys to build the header row. Each object becomes one CSV row; missing keys leave that cell empty.
- 3
Download the .csv
An RFC 4180 compliant CSV file is ready instantly. Open it in Excel, Google Sheets, or import it straight into your database.
Frequently asked questions
- What JSON shape does it expect?
- An array of objects at the top level: `[{"name": "Ada", "role": "engineer"}, {"name": "Linus", "role": "founder"}]`. That's the shape almost every REST API returns, and it's the only shape that maps cleanly to a CSV (one object = one row). Single objects, deeply nested trees, and JSON with non-array roots will produce an error or a CSV that doesn't match your expectations.
- What happens to nested objects and arrays?
- Nested values are JSON-stringified into a single CSV cell rather than flattened into multiple columns. So an object like `{"address": {"city": "NYC"}}` becomes a CSV cell containing the literal text `{"city":"NYC"}`. CSV has no way to represent hierarchy, and silently flattening (`address.city`) would cause more bugs than it solves. Pre-flatten your data in code if you want column-per-leaf-key output.
- What if my objects have different keys?
- We scan every object first, take the union of all keys, and use that as the column set. Objects missing some of those keys get empty cells in those columns. That way you never lose a field that only appears on a few records — every key shows up as its own column, even if it's only populated in row 47 out of 1,000.
- How are nulls written?
- JSON `null` becomes an empty CSV cell, the same as a missing key. CSV doesn't distinguish between empty-string and null, so squashing them together is the most compatible default. If you need a literal "null" or "NA" sentinel string, post-process the file in code or in your database load step.
- Is the column order deterministic?
- Yes, but it follows a specific rule: keys are emitted in the order they're first encountered. The keys of the first object appear first, then any new keys from subsequent objects are appended in the order they show up. If you need a strict alphabetical order or a specific column layout, pre-sort or pre-shape the JSON in your code before converting.
- What encoding is the output, and what about quoting?
- UTF-8 without a BOM. Quoting follows RFC 4180: any cell containing a comma, double-quote, or newline gets wrapped in double quotes, and any embedded double quotes are escaped by doubling them. This is the format Excel, Postgres `COPY`, BigQuery, Snowflake, pandas, and basically every modern parser expects.
- Will it choke on a really deeply nested or large JSON file?
- Deep nesting is fine — we don't recurse into nested objects, we just stringify them — so depth isn't a concern. Size is constrained by your browser's memory: hundreds of thousands of records work on a modern laptop. Multi-gigabyte files will crawl or fail; for those, use a server-side tool like jq or a streaming JSON parser in your own code.