CSV & JSON Converter
Convert tabular CSV to JSON and JSON arrays back to CSV. Your work stays on this device whenever possible.
How to use CSV & JSON Converter
- Paste data into "Input CSV or JSON data" (a four-column staff list is preloaded) and set "Conversion Mode" to "CSV to JSON" or "JSON to CSV".
- Leave "Delimiter" on "Auto-Detect Delimiter", or force Comma, Semicolon, Tab or Pipe when your file is unusual.
- Choose "JSON Indent / Spacing": 2 Spaces, 4 Spaces or Compact (Minified).
- Toggle "First row contains headers (CSV)", "Auto-parse numbers & booleans" and "Unflatten dot-notation (nested objects)" to suit your columns.
- Press "Convert data", read the stats line (records, columns, delimiter), scan the table preview, then use the download button that appears as "Download JSON" or "Download CSV".
Worked example
With the preloaded sample, CSV to JSON, 2 spaces and Auto-Detect, the result is an array of three objects. The first reads {"name":"Alice Smith","department":"Engineering","salary":95000,"active":true}, so salary is a number and active a boolean. The stats line says 3 records, 4 columns and Delimiter Comma. Unticking auto-parse would keep 95000 and true as text strings.
When to use this tool
- Turning an exported spreadsheet into a JSON fixture for a mock API.
- Flattening a nested API response into rows that open cleanly in a spreadsheet.
- Re-reading a semicolon-separated European export and normalising it to standard JSON.
Important limitations
Delimiters are detected by frequency analysis across sample rows. Very large datasets (>50,000 rows) are processed entirely in browser memory; complex multi-level nested arrays are flattened using dot notation.
Frequently asked questions
How does auto-detect pick the delimiter?
It counts commas, semicolons, tabs and pipes in the first 4,000 characters and takes the most frequent, falling back to a comma. Text with many commas inside quoted fields can fool it, so set the delimiter by hand when the result looks wrong.
What does auto-parse numbers and booleans change?
Cells reading true, false or null become JSON literals, and anything Number() accepts becomes a number. That means 007 turns into 7, so untick the option for ZIP codes, phone numbers and other identifiers with leading zeros.
What happens to rows with the wrong number of cells?
The stats line lists warnings such as "Row 4: expected 4 columns, found 3", showing the first three. Missing cells become empty strings and cells beyond the header count are dropped from the JSON.
How are nested objects treated in JSON to CSV?
With the unflatten box ticked, nested objects turn into dotted columns such as address.city and arrays are stored as JSON text inside one cell. Columns are the union of keys across all objects, in first-seen order.
Can the CSV output use something other than a comma?
Yes, choose Semicolon, Tab or Pipe in "Delimiter". Auto-Detect always writes a comma when producing CSV. Cells holding the delimiter, a quote or a line break are wrapped in quotes, and the input must be an array of objects or one object.