AltUtils

JSON ⇄ CSV

Convert JSON arrays to CSV and CSV back to JSON with custom delimiters, header detection, nested-field flattening and file download.

CategoryConverters
Sheet21 / 42
ProcessingIn your browser
0 B

What is the JSON to CSV Converter?

This converter turns JSON into CSV for spreadsheets, databases and BI tools, and turns CSV back into JSON for APIs and code. For JSON to CSV it accepts an array of objects (the header is the union of every key, in the order keys first appear, so records with missing or extra fields still line up), an array of arrays, a single object, or JSON Lines. Nested objects are flattened into dot-notation columns such as address.city; nested arrays can be kept as JSON text in one cell or split into indexed columns like tags.0 and tags.1. If your JSON wraps the records in an object — for example {"data": {"items": [...]}} — pick the array under “Rows from”.

For CSV to JSON the tool uses a full RFC 4180 parser rather than splitting on commas: quoted fields, doubled quotes (""), delimiters and line breaks inside quotes, CRLF or LF line endings, a leading byte-order mark and rows with missing or extra fields are all handled. The delimiter (comma, semicolon, tab or pipe) is detected automatically from the first rows. Type detection converts numbers, true/false and null, but deliberately keeps values such as 007, ZIP codes and long IDs beyond 15 significant digits as strings so nothing is silently corrupted. Dot-notation headers can be rebuilt into nested objects, which makes a JSON → CSV → JSON round trip lossless.

Everything runs locally in your browser — files are read with the File API and never uploaded. Inputs up to about 1 MB convert live as you type; larger files (tested with 5 MB+) convert on demand so the page stays responsive, and a preview table shows the first 100 rows. For Excel, choose CRLF line endings and enable the UTF-8 BOM so accented characters display correctly; Excel in locales that use a decimal comma (much of Europe) expects a semicolon delimiter.

Frequently asked questions

How are nested JSON objects converted to CSV columns?
With “Flatten nested objects” on, each leaf value gets its own column named by its path, e.g. {"user": {"name": "Ada"}} becomes a user.name column. Arrays are either written as JSON text in a single cell or expanded into indexed columns (tags.0, tags.1). With flattening off, every nested value is written as JSON text.
Why does Excel show strange characters or put everything in one column?
Excel may not detect UTF-8 unless the file starts with a byte-order mark — enable “UTF-8 BOM in download”. If everything lands in one column, your Excel locale probably expects semicolons (common in Germany, France and much of Europe); choose the semicolon delimiter.
Will my ZIP codes, phone numbers or IDs lose their leading zeros?
Not in this tool. When converting CSV to JSON, type detection only turns a value into a number if it is written canonically and survives the conversion exactly, so 007, 02134 and 9007199254740993 stay strings. Turn off “Detect types” to keep every value as a string.
How does the CSV parser handle commas, quotes and line breaks inside values?
It follows RFC 4180: a field wrapped in double quotes can contain the delimiter, line breaks and quotes written as two double quotes (""). When writing CSV, the tool quotes exactly the fields that need it — or every field if you enable “Quote every field”.
Can I convert CSV back into nested JSON?
Yes. Enable “Unflatten dot keys”: a header like address.city creates {"address": {"city": …}}, and numbered keys like tags.0, tags.1 become an array. Cells that contain JSON arrays or objects are parsed back when type detection is on.
Is there a file size limit, and is my data uploaded anywhere?
Files up to 50 MB can be opened; conversion speed depends on your device, and multi-megabyte files typically take well under a second. Nothing is uploaded — parsing and conversion happen entirely in your browser, so the tool also works offline once loaded.