JSON to CSV Converter
Convert a JSON array of objects into CSV, or parse CSV back into JSON, both ways in your browser. Nested objects flatten to dot-notation columns, the header is the union of all keys, and quoting follows RFC 4180. Nothing is uploaded.
How JSON and CSV map to each other, and why the edges are tricky
Rows and objects are the same shape
A CSV is a table: a header row of column names, then one row of values per record. A JSON array of objects is the same idea written differently, where each object is a row and each key is a column. That correspondence is what makes the conversion natural. A single JSON object (not wrapped in an array) is treated as one row, and on the way back a header-less CSV becomes an array of arrays instead of objects, because there are no key names to attach.
The header is the union of keys
Different objects in the array can carry different keys, so the header is built from the union of every key seen across all rows, in first-seen order so the layout stays stable. A row that is missing a column gets an empty value for it, which is the usual way spreadsheets represent a blank cell.
Flattening nested values
CSV has no notion of nesting, so a nested object is flattened into dot-notation columns. For example {"user":{"id":5}} becomes a single column named user.id. Arrays are kept as a compact JSON string in one cell (so [1,2,3] stays [1,2,3]) rather than being spread across numbered columns, which keeps the column set predictable when array lengths vary between rows. The choice is a tradeoff, and either convention is valid as long as it is applied consistently.
RFC 4180 quoting
The CSV format is described by RFC 4180. A field is wrapped in double quotes when it contains the delimiter, a double quote, a carriage return, or a line feed, and any double quote inside the field is escaped by doubling it. So the value x,y is written "x,y" and the value say "hi" becomes "say ""hi""". The parser here applies the same rules in reverse, so commas and newlines inside a quoted field are read as data, not as separators.
CSV has no real types, so inference is a guess
Every CSV cell is just text. There is no stored difference between the number 5 and the string "5", or between the boolean true and the word "true". When "infer types" is on, the parser applies a heuristic: a cell that looks like a number becomes a number, the words true and false become booleans, and an empty unquoted cell or the word null becomes null. This is convenient but not always correct (a ZIP code like 01234 would lose its leading zero, and a product code that happens to be all digits would become a number), so turn inference off when you need every value preserved exactly as written.