What This Tool Does
JSON to CSV is the inverse of CSV to JSON. The Microapp converter takes a JSON array of objects (or an array of arrays) and turns it into a clean CSV — one row per object, one column per unique key, header row on top. Runs in your browser, no upload, no server.
The most common reason to convert JSON to CSV: you got data from an API in JSON format, and now you need to load it into Excel, Google Sheets, or any analytics tool that expects tabular data.
How to Use It
- Paste your JSON array into the input box. It must be an array at the top level — single objects need to be wrapped in
[ ]. - The CSV output appears instantly. The first row contains the column headers, derived from the union of all keys across all objects.
- Click "Copy" or "Download .csv" to save the result.
[
{ "name": "Alice", "age": 30, "city": "NYC" },
{ "name": "Bob", "age": 25, "city": "SF" }
]CSV output:
name,age,city
Alice,30,NYC
Bob,25,SF
What the Tool Handles
Inconsistent objects. Some JSON arrays have objects with different keys — one row has email, another has phone, and so on. The converter takes the union of all keys to build the header. Missing values become empty cells.
Values containing commas, quotes, or newlines. These are properly escaped per the CSV spec — fields with special characters are wrapped in double quotes, and any embedded double quotes are doubled.
Nested objects (flattening). A nested field like { address: { city: "NYC", zip: "10001" } } becomes two flat columns: address.city and address.zip. This makes the data spreadsheet-friendly without losing structure. Toggle "Flatten nested objects" off if you want them stringified instead.
Arrays as values. If a field's value is an array (like tags: ["a", "b", "c"]), it gets joined into a single string with semicolons ("a;b;c"). Excel users can split it back later if needed.
Booleans, nulls, numbers. Booleans become true/false strings; nulls become empty cells; numbers stay as numbers (no quotes around them).
What to Watch For
Different object shapes can produce sparse CSVs. If your JSON has 100 objects and each has a different set of keys, you'll get a wide CSV with mostly empty cells. Consider whether the data is genuinely tabular before converting — JSON's strength is heterogeneous, hierarchical data, and forcing it flat may not be what you actually want.
Order of columns is the order keys first appear. CSV has no concept of "schema order" — the converter uses insertion order: first key seen becomes the first column, etc. If you need a specific column order, pre-process your JSON to match.
Encoding. The CSV output is UTF-8. Excel on Windows historically defaults to a different encoding and can mangle non-ASCII characters. To force Excel to read UTF-8, save the CSV with a BOM (the converter has an option for this) or open via "Data → From Text/CSV" in Excel and select UTF-8.
When Not to Convert
Streaming data. If you have a multi-gigabyte JSON file, don't paste it into a browser. Use a streaming parser like jq on the command line: jq -r '.[] | [.name, .age, .city] | @csv'.
Highly nested data. Flattening can produce 50+ columns from a 5-level-deep object, and the resulting CSV is harder to work with than the original JSON. Some data wants to stay JSON.
Time-series or graph data. Tabular formats are bad at relationships and sequences. JSON or specialized formats (Parquet, Arrow) usually serve better.
Common JSON Shapes and What Comes Out
| JSON shape | CSV result |
|---|---|
| Array of flat objects | Standard table — one row per object |
| Array of arrays | Table with auto-numbered columns |
| Single object | Error — wrap in [ ] first |
| Array of nested objects | Flattened with dot-notation columns (toggleable) |
| Array containing arrays-as-values | Arrays joined with ; in cells |
| API response wrapper | Drill into the array part first (e.g., {data: [...]} → paste just the [...]) |
Related Tools
For the inverse conversion, use the CSV to JSON Converter. To pretty-print JSON before converting (or to debug a parse error), the JSON Formatter validates and formats. For converting Markdown tables to comparable text, see the Markdown to HTML tool.