CSV ↔ JSON Converter
Convert CSV to JSON and JSON to CSV — headers, delimiters and types handled.
Conversion runs locally — your data never leaves this browser.
What is CSV ↔ JSON Converter?
CSV ↔ JSON Converter turns CSV data into a JSON array and JSON back into CSV, both ways. It auto-detects the delimiter (comma, semicolon, tab, or pipe), maps the header row to object keys, converts number/boolean/null cells into real JSON types, and handles quoted fields with embedded commas and line breaks per RFC 4180. Copy the result or download it as a .json / .csv file — all without uploading anything.
Key features
- Both directions: CSV → JSON and JSON → CSV
- Auto delimiter detection — comma, semicolon, tab, or pipe
- Header row becomes object keys; numbers, booleans and null typed automatically
- RFC 4180 quoting: embedded commas, quotes, and multi-line cells parse correctly
- Copy the result or download as .json / .csv — nothing is uploaded
CSV ↔ JSON Converter — convert both ways online
CSV and JSON solve the same problem — a table of records — from opposite ends. Spreadsheets, database exports, and analytics dashboards speak CSV; APIs, config files, and JavaScript speak JSON. This converter moves data between them both ways, live as you type, without uploading anything. Reach for it when a client hands you a .csv export you need to feed an API, or when you have a JSON response you want to open in Excel or Google Sheets.
CSV → JSON
Paste your CSV and it becomes a JSON array. A few options shape the output:
- Delimiter — auto-detected from your data, so a comma file, a European semicolon file, a tab-separated export, or a pipe-delimited dump all just work. You can also force one explicitly if detection guesses wrong on sparse data.
- First row is header — when on, each row becomes an object keyed by the header:
{"name":"Kim","age":30}. Blank or duplicate header cells are given generated keys likecolumn_2andid_2so no data is silently merged or lost. Turn it off and rows become plain arrays instead. - Convert numbers & booleans — cells that look like
30,1.5,true, ornullbecome real JSON types instead of quoted strings. Crucially, leading-zero values like007stay strings on purpose, because they're almost always IDs, ZIP codes, or phone numbers you don't want mangled into7.
Quoting follows RFC 4180, the actual CSV standard: a field wrapped in double quotes may contain embedded commas, escaped "" quotes, and even literal line breaks, and it still parses as one cell. That's why exports straight out of Excel and Google Sheets convert cleanly without hand-editing.
JSON → CSV
Paste an array of flat objects and get CSV back. The header row is the union of every key across all objects, in first-seen order — so if some records have an email field and others don't, the column still appears, and the missing cells are left empty rather than shifting everything out of alignment. Arrays of arrays work too, producing a headerless grid. A nested object or array inside a cell is serialized as a JSON string, and any cell containing the delimiter, a quote, or a newline is automatically wrapped in quotes so the file stays valid.
Common gotchas
- Semicolon files come from locale, not error. Excel in many European regions exports with
;because the comma is the decimal separator. Auto-detection handles it — you don't need to find-and-replace first. - Type conversion is a choice, not magic. With conversion on, a column of order numbers that happen to look numeric becomes JSON numbers. If those are identifiers, either keep leading zeros (which forces strings) or turn conversion off.
- Deeply nested JSON won't round-trip to a flat table. CSV has no concept of nesting; objects inside cells are stringified. Flatten your structure first if you need columns for nested fields.
Privacy
Everything — delimiter detection, parsing, type coercion, and re-encoding — runs in your browser's own JavaScript. Your data is never uploaded or stored, which makes it safe for customer lists, exports, and anything you wouldn't paste into a random website.
Frequently asked questions
- My CSV uses semicolons instead of commas. Do I need to fix it first?
- No. The converter auto-detects the delimiter among comma, semicolon, tab, and pipe. Excel in many European locales exports with semicolons because the comma is the decimal separator, and those files convert as-is with no find-and-replace.
- Why did '007' stay a string when '30' became a number?
- With type conversion on, cells that look like 30, 1.5, true, or null become real JSON types. But leading-zero values like 007 are kept as strings on purpose, because they're almost always IDs, ZIP codes, or phone numbers that would break if turned into 7.
- Can it handle commas or line breaks inside a single cell?
- Yes. Quoting follows RFC 4180, so a field wrapped in double quotes can contain embedded commas, escaped "" quotes, and even literal line breaks and still parse as one cell. That's why raw exports from Excel and Google Sheets work without cleanup.
- What happens to nested data when I convert JSON to CSV?
- CSV has no concept of nesting, so a nested object or array inside a value is serialized as a JSON string in that cell. If you need real columns for nested fields, flatten the structure before converting.
- My objects don't all have the same keys. Will the columns misalign?
- No. The CSV header is built from the union of every key across all objects, in first-seen order, and any missing value becomes an empty cell rather than shifting the row. So records with an extra 'email' field still line up with those without one.
- Is my data uploaded anywhere?
- No. Delimiter detection, parsing, type coercion, and re-encoding all run in your browser's JavaScript, and nothing is uploaded or stored in either direction. That makes it safe for customer lists and internal exports.
Privacy
The conversion, including delimiter detection and type coercion, happens locally in your browser; your data is never uploaded in either direction.
