Both write data as text, but they're shaped differently: CSV is a table, JSON is a tree (structures nested inside each other).
At a glance
CSV — a table of rows and cells. Opens straight in Excel and is compact. Every value is text, so numbers and dates are interpreted by the reader.
JSON — {key: value} objects and [lists] that can nest, with numbers, true/false and null kept distinct. Common for APIs and app settings.
When converting
CSV → JSON uses the first-row column names as keys. JSON → CSV flattens nested objects into columns like “address.city” and puts lists in one cell, joined or as JSON text. So deeply nested JSON turns into many columns.
Which to use
CSV suits data people view and edit in Excel; JSON suits data passed between programs. For very long records such as logs, JSON Lines (one object per line) is also popular.