From JSON to CSV
CSV is a flat grid and JSON is a tree, so the conversion has to decide what to do about nesting. This tool takes the array you paste, walks every object in it, and collects the union of their keys in first-seen order - that becomes the header row, so records with missing fields simply get an empty cell instead of shifting columns. A nested object is flattened one level using dotted keys, so {"address": {"city": "London"}} becomes a column named address.city. Arrays and anything deeper than one level are written into the cell as compact JSON text, which keeps the data recoverable without inventing dozens of columns.
Quoting follows RFC 4180, the closest thing CSV has to a standard. A value is wrapped in double quotes only when it needs to be: when it contains the delimiter, a double quote, or a line break. A quote inside a quoted value is doubled, so Katherine Johnson, PhD comes out as "Katherine Johnson, PhD" and He said "hi" becomes "He said ""hi""". Booleans are written as true and false, and null and missing keys both become empty cells.
From CSV back to JSON
The reverse direction runs a real character-by-character parser rather than splitting on commas, which is the only way to survive quoted fields. It tracks whether it is inside quotes, so a comma or a newline inside "Johnson, PhD" does not break the row, and it collapses doubled quotes back into one. The first row becomes the keys; blank header cells are renamed column1, column2 and so on. A leading byte order mark - the invisible character Excel writes at the start of a UTF-8 CSV - is stripped, because otherwise your first key would carry it and lookups would silently fail.
With type conversion on, values that look like numbers become numbers, and true, false and null become the matching JSON literals; everything else stays a string. Leading zeros are deliberately left alone, so a ZIP code like 02134 or a phone number stays text rather than turning into 2134. Turn the option off when every field must remain a string, which is often what a downstream import expects.
Delimiters, Excel and gotchas
Pick the delimiter that matches your file. Comma is the default worldwide, but Excel on a machine with a European locale writes and expects semicolons, and exports from analytics tools often use tabs. If CSV to JSON produces one giant column, the delimiter is wrong. Tab-separated data is the safest choice when values may themselves contain commas.
Two Excel-specific traps are worth knowing. Long digit strings - order IDs, IMEIs, credit card numbers - are parsed by Excel as numbers and displayed in scientific notation, permanently losing digits when the file is saved again; import the column as Text or prefix the cell with an apostrophe. And a cell that begins with =, +, - or @ is treated as a formula, which is the basis of CSV injection attacks against spreadsheets; if the data came from untrusted users, prefix such cells before sharing the file. Everything on this page is computed locally, so exports containing customer data never leave your browser.