CSV ↔ JSON Converter
Developer Tools
Convert CSV to JSON and back, with proper handling of quoted fields, custom delimiters, and type inference. Works on any well-formed CSV or array-of-objects JSON.
Runs entirely in your browserAbout CSV ↔ JSON Converter
CSV and JSON are the two most common interchange formats in data work, and you swap between them constantly: pulling a spreadsheet export into a JavaScript app, dumping an API response into a spreadsheet, prepping data for a SQL bulk-load, transforming a JSON config into a flat table for review. Doing the conversion by hand is fiddly because CSV has surprisingly subtle rules — quoted fields, escaped quotes, newlines inside fields, regional delimiters (`;` in many European locales).
This converter uses Papa Parse, the same battle-tested CSV library used in thousands of production apps. Either direction supports four delimiters (comma, semicolon, tab, pipe), and the CSV→JSON path can optionally treat the first row as a header (so each output row becomes an object) and infer numbers/booleans from string content. The JSON→CSV path accepts any array of objects, gracefully handles missing fields, and lets you toggle the header row and force-quote every value. All processing is local in your browser — paste your data without worrying about it leaving your machine.
How to use
- 1
Pick a direction
Use the tabs at the top: CSV → JSON to convert spreadsheet data into a JavaScript object array, or JSON → CSV for the reverse.
- 2
Set the delimiter
Comma is the international standard. Many European exports use semicolon. Tab is for TSV files. Pipe is occasionally used for ETL pipelines.
- 3
(CSV → JSON only) Choose header and type inference
Toggle 'First row is header' when your CSV has a header row (default on). Toggle 'Parse numbers/booleans' to coerce values like `42` → number, `true` → boolean. Off if you want everything as strings.
- 4
Paste your data
Drop your CSV or JSON into the left editor. Conversion runs live as you type.
- 5
Copy or download the result
Use the Copy or Download buttons to grab the converted output. CSV downloads as `data.csv`, JSON as `data.json`.
Examples
Simple CSV → JSON with type inference
Input
id,name,active
1,Ada,true
2,Grace,falseOutput
[
{ "id": 1, "name": "Ada", "active": true },
{ "id": 2, "name": "Grace", "active": false }
]CSV with quoted field containing a comma
The quoted field is parsed as a single value, not split.
Input
name,role
"Hopper, Grace",Rear AdmiralOutput
[
{ "name": "Hopper, Grace", "role": "Rear Admiral" }
]JSON → CSV
Input
[
{ "id": 1, "name": "Ada" },
{ "id": 2, "name": "Grace" }
]Output
id,name
1,Ada
2,GraceFrequently asked questions
Why does European data often use semicolons?+
Many European locales use the comma as the decimal separator (1,5 instead of 1.5). Reusing comma as a CSV delimiter in that context creates ambiguity, so spreadsheet apps default to semicolons in those locales. Excel exports vary based on the OS locale.
How are quotes and newlines inside fields handled?+
Per RFC 4180: a field containing a comma, newline, or quote must be wrapped in double quotes. A literal quote inside a quoted field is escaped as `""` (two quotes). Papa Parse handles all of this correctly.
What does 'Parse numbers/booleans' actually do?+
It runs each cell through a heuristic that recognizes `true`/`false` (as booleans), `42`/`3.14` (as numbers), and leaves everything else as strings. Turn it off if you need everything to stay as strings — for example, if your IDs are zero-padded (`007` should stay `"007"`, not become `7`).
What happens to nested JSON when converting to CSV?+
Papa Parse JSON-stringifies nested values. So `{ "address": { "city": "Berlin" } }` becomes a single CSV cell containing `"{"city":"Berlin"}"`. If you need flat columns for nested data, restructure your JSON before converting.
Can I convert TSV (tab-separated values)?+
Yes — pick Tab as the delimiter in either direction. TSV files use literal tab characters as separators.
Does the converter respect the row order?+
Yes. Order is preserved in both directions. No sorting or shuffling happens.
Is my data sent anywhere?+
No. Papa Parse runs entirely in your browser. The conversion is a pure transform — nothing is transmitted.
Related tools
JSON Formatter
Format, beautify, and explore JSON with an expandable tree view. Includes indent control and minify.
JSON Validator
Validate JSON structure and pinpoint syntax errors by line and column.
HTML Formatter
Clean and indent messy HTML for better readability.
CSS Formatter
Format and organize CSS automatically with configurable brace and indent styles.
SQL Formatter
Beautify SQL queries with proper indentation across Postgres, MySQL, SQLite, and MSSQL dialects.
XML Formatter
Format XML into a clean, readable structure with attribute control.