CSV to JSON & JSON to CSV Converter — Free Online Tool
Convert CSV to JSON and JSON to CSV bidirectionally in your browser with full RFC-4180 quote handling, custom delimiters, header toggles, and instant download.
CSV ↔ JSON
How to Use This Tool
- 01 Select your conversion direction at the top: CSV → JSON or JSON → CSV (or click Swap anytime to flip the output back into the input).
- 02 Choose the column delimiter matching your file: Comma (,), Semicolon (;), or Tab (\t) for TSV spreadsheets.
- 03 Keep "First row is header" checked to map CSV columns into named JSON object keys, or uncheck it to output a 2D array of rows.
- 04 When converting CSV → JSON, toggle "Pretty JSON" on for readable 2-space indentation or off for compact single-line output.
- 05 Paste your CSV or JSON data into the left editor—or click Load Sample to preview how quoted commas and escaped quotes are handled.
- 06 Click Copy Output to copy the converted dataset, or click Download to save a ready-to-use .json or .csv file.
How It Works
Practical Examples
Converting an Exported Contact List (CSV → JSON)
name,email,city Ana Silva,[email protected],"Lisbon, PT" Carlos Ruiz,[email protected],Madrid
[
{
"name": "Ana Silva",
"email": "[email protected]",
"city": "Lisbon, PT"
},
{
"name": "Carlos Ruiz",
"email": "[email protected]",
"city": "Madrid"
}
]
Notice how "Lisbon, PT" stays intact as a single city value instead of splitting into an extra column because the parser respects RFC-4180 quoting.
Handling Semicolon-Delimited European Excel CSV
sku;price;stock
A-101;19,90;42
B-205;49,50;8
[{"sku":"A-101","price":"19,90","stock":"42"},{"sku":"B-205","price":"49,50","stock":"8"}]
Switching the delimiter to Semicolon (;) cleanly parses spreadsheets exported from Portuguese, Spanish, or German locales where commas are decimal separators.
Exporting API Records to Spreadsheet (JSON → CSV)
[{"id":1,"title":"Pro Plan","note":"Includes \"Priority\" support"},{"id":2,"title":"Free Plan"}]
id,title,note
1,Pro Plan,"Includes ""Priority"" support"
2,Free Plan,
Missing keys on the second object automatically become empty cells, and embedded quotes are properly escaped as doubled quotes for Excel and Google Sheets.
Tips & Best Practices
- If Excel exported your CSV with semicolons instead of commas, change the Delimiter dropdown to Semicolon (;) before copying.
- Uncheck "First row is header" when converting raw matrices or coordinate tables that do not have column names.
- Use the Swap button to round-trip test your data and verify that special characters and quotes survive intact.
- When converting nested JSON objects to CSV, nested values are safely serialized as JSON strings inside their cell so no data is lost.
- Because conversion happens locally in your browser, you can safely convert confidential payroll, CRM, or analytics exports without uploading them.
Frequently Asked Questions
Is my CSV or JSON data uploaded to a server?
No. Every conversion runs 100% locally in your browser using JavaScript. Your spreadsheet or API records never leave your device.
How does the tool handle commas and line breaks inside CSV cells?
Following the RFC-4180 standard, any field wrapped in double quotes can safely contain delimiters, newlines, and escaped double quotes ("").
Why does my Excel CSV use semicolons instead of commas?
In many regions (such as Brazil, Portugal, Spain, and much of Europe), the comma is used as a decimal separator, so Excel defaults to semicolon-separated CSVs. Simply select Semicolon (;) in the delimiter menu.
What happens if JSON objects in an array have different keys?
When converting JSON → CSV, the tool collects the union of all keys across every object in the array and leaves blank cells where an object does not define a particular key.
Can I convert TSV (Tab-Separated Values) copied directly from Google Sheets or Excel?
Yes! Copying cells from Excel or Google Sheets places tab-separated text on your clipboard. Select Tab (\t) as the delimiter and paste directly into the CSV Input box.
Related Tools
Base64 Encoder
Encode and decode UTF-8 text, JWT-ready URL-safe Base64, and files to Data URIs instantly in your browser with live validation and zero server uploads.
JSON Formatter
Beautify, validate, sort keys, and minify JSON payloads instantly in your browser with line-by-line error diagnostics and one-click download.
JWT Decoder
Decode JWT headers and payloads; inspect signature segments and expiry dates instantly. Review claims locally in your browser with clear warnings.
Regex Tester
Test JavaScript regular expressions with live match highlighting, capture groups, flags and replacement preview. Runs locally in your browser.