CSV to JSON Converter
ConvertersConvert CSV files to JSON arrays or objects with custom delimiters. Free, private — all processing in your browser.
Paste a CSV and get a clean JSON array of objects — each row becomes an object keyed by the header row — with a preview table so you can eyeball the parse before you copy. It goes the other way too: paste a JSON array and get CSV back. The delimiter is auto-detected (comma, semicolon, tab, or pipe), so a European ;-separated export or a tab-separated dump just works without fiddling.
It all runs in your browser, which matters when the CSV is an export of real customer or business data you'd rather not paste into a random server.
How to use the CSV to JSON Converter
- 1
Paste CSV or upload file
Drop a .csv file, paste CSV text, or type directly. Auto-detection figures out the delimiter.
- 2
Verify delimiter
Check the detected delimiter (comma, semicolon, tab). Change if auto-detect got it wrong.
- 3
Configure headers
First row contains headers? Enable (usual default). Off if your CSV has no header row.
- 4
Enable type inference (optional)
Convert "36" to number 36, "true" to boolean true, etc. Off by default for strict string preservation.
- 5
View JSON output
Clean, formatted JSON appears instantly. Indentation is configurable (2 or 4 spaces).
- 6
Copy or download
Copy to clipboard or download as .json file. Ready for API POST, database import, or local analysis.
Worked examples
Simple CSV to JSON
Standard comma-separated with headers.
name,email,age Jane,jane@example.com,36 Bob,bob@example.com,42
[
{
"name": "Jane",
"email": "jane@example.com",
"age": "36"
},
{
"name": "Bob",
"email": "bob@example.com",
"age": "42"
}
]With type inference
Numbers become numeric values.
name,age,active Jane,36,true Bob,42,false
[
{ "name": "Jane", "age": 36, "active": true },
{ "name": "Bob", "age": 42, "active": false }
]European CSV (semicolon)
Common in European spreadsheet exports.
name;price;currency Widget;9,99;EUR Gadget;19,99;EUR
[
{ "name": "Widget", "price": "9,99", "currency": "EUR" },
{ "name": "Gadget", "price": "19,99", "currency": "EUR" }
]Quoted fields with commas
Names with commas must be quoted in CSV.
name,email "O'Brien, Patrick",patrick@example.com "Doe, Jane",jane@example.com
[
{ "name": "O'Brien, Patrick", "email": "patrick@example.com" },
{ "name": "Doe, Jane", "email": "jane@example.com" }
]Nested objects from dot-notation
Columns like user.name create nested structures.
id,user.name,user.email,order.total 1,Jane,jane@test.com,99.99 2,Bob,bob@test.com,149.99
[
{
"id": "1",
"user": { "name": "Jane", "email": "jane@test.com" },
"order": { "total": "99.99" }
},
{
"id": "2",
"user": { "name": "Bob", "email": "bob@test.com" },
"order": { "total": "149.99" }
}
]JSON to CSV
Reverse direction.
[
{ "name": "Jane", "age": 36 },
{ "name": "Bob", "age": 42 }
]name,age Jane,36 Bob,42
Features at a glance
Bidirectional conversion
CSV → JSON or JSON → CSV. Toggle with one click. Both directions handle edge cases.
Multiple delimiters
Comma (standard), semicolon (European), tab (TSV), pipe, or custom. Auto-detect or specify.
Headers on/off
With headers: output is an array of objects keyed by column names. Without: array of arrays.
Type inference
Optional: convert `"36"` to `36` (number), `"true"` to `true` (boolean), empty to null. Off by default (all strings).
Nested object support
Column names like `user.name` and `user.email` create nested JSON: `{"user": {"name": ..., "email": ...}}`.
Handles quoted fields
Properly parses fields with commas, newlines, and escaped quotes per RFC 4180.
BOM handling
Byte Order Mark from Excel exports is stripped automatically.
Large file support
Multi-megabyte CSV files process without issue. Your browser's memory is the only limit.
When to use the CSV to JSON Converter
Data migration
- →Spreadsheet to API: Export Excel/Google Sheets as CSV, convert to JSON, POST to your API. Standard data migration workflow.
- →Database import: MongoDB, DynamoDB, Firebase accept JSON. Convert CSV for bulk imports.
- →Legacy system export: Old systems often only export CSV. Modern systems expect JSON. This bridges the gap.
Analysis and reporting
- →Analyze CSV in JavaScript: Developers convert CSV to JSON for easier manipulation in JavaScript (Array.filter, .map, .reduce).
- →Create dashboards from CSV: Business analysts get CSV reports, convert to JSON for charting libraries (Chart.js, D3, Plotly).
- →Data transformation: CSV → JSON → transform in Node/Python → back to CSV is a common ETL pattern.
Development and testing
- →Test fixtures from CSV: Convert spreadsheet test data to JSON for unit test fixtures.
- →Mock API responses: Create realistic mock data from CSV for frontend development before backend is ready.
- →Configuration management: Convert CSV configuration files (from non-technical stakeholders) to JSON for application use.
Business operations
- →Product catalog import: E-commerce platforms often accept JSON. Export from Excel/ERP, convert to JSON for import.
- →Customer data transfers: CRM imports/exports. CSV from legacy CRM → JSON for modern CRM API.
- →Marketing list conversion: Email list CSV → JSON for bulk email API submissions.
Under the hood
How the mapping works. The first row is treated as the header, and each following row becomes a JSON object using those headers as keys. So name,age / Alice,30 becomes [{"name":"Alice","age":"30"}]. Going back, the object keys become the header row and values fill each line.
One important honesty note: values come out as strings. 30 in the CSV becomes "30" in the JSON, because CSV has no type information — everything is text. If you need real numbers or booleans, cast them after conversion; don't assume the JSON is typed.
Delimiter detection counts candidate separators in the first line and picks the most frequent, which handles the common comma / semicolon / tab / pipe exports. You can also force a delimiter if detection guesses wrong on an unusual file.
Where simple CSV parsing struggles. This handles standard, well-formed CSV, including basic quoted values. But CSV's genuinely hard cases — a delimiter *inside* a quoted field ("Smith, John"), or a newline embedded inside a quoted cell — are exactly where lightweight parsers slip. If your data has those, verify the preview carefully or run it through a dedicated CSV library (Papa Parse, Python's csv) that fully implements RFC 4180.
Common problems and solutions
⚠Commas inside quoted fields split the row
A value like "Smith, John" contains the delimiter. Simple parsers can break on it. Check the preview table; if columns are misaligned, use a full CSV library that honors quoted fields per RFC 4180.
⚠Numbers come out as strings
CSV has no types, so every value converts to a JSON string ("30", not 30). If your code needs real numbers or booleans, cast them after conversion.
⚠Wrong delimiter detected
Auto-detect picks the most common separator in the header line. On unusual files it can guess wrong — turn off auto-detect and choose comma, semicolon, tab, or pipe explicitly.
⚠Embedded newlines inside a cell
A quoted field containing a line break is valid CSV but trips line-by-line parsing. If your data has multi-line cells, verify the output or use a spec-complete parser.
⚠Ragged rows (different column counts)
If some rows have more or fewer fields than the header, values shift into the wrong keys. Clean the source so every row matches the header, or expect misaligned objects.
Alternatives and comparisons
CSV vs JSON as formats. CSV is flat, compact, and universally opened by spreadsheets — ideal for tabular exports and imports. JSON is hierarchical and typed(ish) — ideal for APIs and nested data. Convert CSV → JSON to feed a spreadsheet export into code; convert JSON → CSV to hand an API result to someone in Excel.
This tool vs a real CSV library. For quick, well-behaved data this is faster than writing code. For messy real-world CSV — embedded commas and quotes, ragged rows, mixed encodings, millions of rows — use Papa Parse (JS) or the csv module (Python), which implement the full spec and stream large files.
Auto-detect vs forcing a delimiter. Auto-detect is right almost always, but if a file has, say, more semicolons in the data than commas in the header, it can misjudge. When the preview looks wrong, switch off auto-detect and pick the delimiter explicitly.
CSV to JSON Converter — FAQ
▶Does it detect the delimiter automatically?
Yes — it inspects the header line and picks the most frequent of comma, semicolon, tab, or pipe. If it guesses wrong on an unusual file, turn off auto-detect and choose the delimiter yourself.
▶Are numbers converted to real JSON numbers?
No. CSV carries no type information, so every value becomes a JSON string. Cast to numbers or booleans in your code after converting if you need real types.
▶Does it handle commas inside quoted fields?
Basic quoted values, yes. But CSV's hardest cases — a delimiter or newline inside a quoted field — can trip lightweight parsing. Check the preview; for gnarly data use a full RFC 4180 parser like Papa Parse.
▶Can it convert JSON back to CSV?
Yes. Paste a JSON array of objects and it produces CSV, using the object keys as the header row and quoting/escaping values that contain the delimiter or quotes.
▶Is my data uploaded?
No. Parsing and conversion happen entirely in your browser, so it's safe for exports of real customer or business data. Nothing is sent to a server.
▶When should I use a real CSV library instead?
For messy or large data — embedded delimiters, multi-line cells, ragged rows, unusual encodings, or millions of rows. Papa Parse (JavaScript) and Python's csv module implement the full spec and stream big files efficiently.
Additional resources
- RFC 4180 — CSV Format — IETF specification for CSV format.
- CSV on the Web (W3C) — W3C primer on tabular data and CSV.
- PapaParse — Popular JavaScript CSV parser.
- JSON Specification (RFC 8259) — IETF JSON standard.
- JSON vs CSV — Tooleras blog — Our comparison of data interchange formats.
Related tools
All ConvertersCSV to Markdown Table
Convert CSV or TSV data into clean GitHub-flavored markdown tables, bullet lists, or numbered lists with configurable delimiters, alignment, and pipe escaping.
CSV to SQL
Convert CSV data to SQL INSERT statements with auto type detection, escaping, and configurable table name and SQL dialect.
HTML Table to CSV
Convert HTML tables to CSV format for data analysis. Handles rowspan, colspan, and extracts clean tabular data.
JSON Formatter
Format, validate, and beautify JSON instantly in your browser
JSON to CSV
Flatten nested JSON into CSV rows — ready for Excel, Google Sheets, analysis
JSON to SQL
Generate SQL INSERT statements and CREATE TABLE from JSON arrays
Learn more
Explore more tools
200+ free tools that run in your browser.
Browse all tools →