CSV ⇄ JSON
Convert CSV to a JSON array of objects, or JSON back to CSV, with proper handling of quotes, commas-in-fields, and custom delimiters. All in your browser.
CSV and JSON, both directions
CSV is compact and spreadsheet-friendly; JSON is what your code wants. This converter goes both ways. The CSV
parser is spec-aware: it handles quoted fields, commas and newlines inside quotes,
and escaped quotes (""), so a messy export from Excel or a database doesn’t
break it. Numbers and true/false/null are detected and converted to real
JSON types rather than left as strings.
Options
- Delimiter: comma, semicolon, tab, or pipe, for European exports and TSV files.
- First row is header: on, each row becomes an object keyed by the header; off, rows become arrays.
Going JSON → CSV, an array of objects is flattened to columns (the union of all keys), and any value containing the delimiter, a quote, or a newline is safely quoted.
FAQ
Does it handle commas inside a field?
Yes, fields wrapped in double quotes can contain commas, newlines, and escaped quotes. That’s the part naive split-on-comma converters get wrong.
Are numbers kept as numbers?
Yes. Values that look like numbers, booleans, or null become real JSON types. Anything ambiguous stays a string.
Is my data uploaded?
No, parsing runs in your browser, so it’s safe for private exports and works offline.
Related
Type the result with JSON → TypeScript or JSON → Go; swap formats with YAML ⇄ JSON.