CSV ⇄ JSON Converter
Convert between CSV and JSON in both directions. Auto-detect delimiter, handle multi-line quoted fields, type coercion, file upload, and download. Free, no signup.
What is CSV and what is JSON?
CSV (Comma-Separated Values) is a plain-text file format that stores tabular data one row per line, with fields separated by a delimiter (most often a comma, but semicolons, tabs, and pipes are also common). CSV is the lowest-common-denominator data format — every spreadsheet (Excel, Google Sheets, Numbers), every database (SQL Server, MySQL, Postgres, SQLite), and every programming language has built-in CSV support.
JSON (JavaScript Object Notation) is the dominant data format on the modern web — every REST API, every modern config file (Vercel, Netlify, npm), and every frontend framework speaks JSON. Unlike CSV, JSON supports nested objects, arrays, numbers, booleans, and nulls natively. This bidirectional converter handles both directions: CSV → JSON for importing spreadsheet data into web apps, and JSON → CSV for exporting API data into Excel.
CSV vs JSON: when to use which
| Feature | CSV | JSON |
|---|---|---|
| Structure | Flat, tabular (rows × columns) | Hierarchical, nested objects + arrays |
| Data types | Everything is a string | Strings, numbers, booleans, nulls, arrays, objects |
| Human readability | Easy for tabular data | Easy with pretty-printing |
| File size | Smaller (no key repetition) | Larger (keys repeated per object) |
| Nesting | Not supported | Fully supported |
| API usage | Rarely used in modern APIs | Standard for REST and web APIs |
| Spreadsheet support | Native (Excel, Google Sheets, Numbers) | Requires import/conversion |
| Standardization | RFC 4180 (loose) | RFC 8259 (strict) |
How CSV → JSON conversion works
- Detect the delimiter — sniff the first line for the most-common separator (comma, semicolon, tab). Many European CSVs use semicolons because comma is the decimal mark.
- Parse the header row — the first row becomes JSON object keys. Disable this for headerless CSV (you'll get an array of arrays instead).
- State-machine parse each row — handle quoted fields (preserve commas inside
"Smith, John"), escaped quotes ("He said ""hi"""), and multi-line values (quoted fields containing newlines — common in CSV exports from databases). - Type coercion (optional) — convert
"42"→42,"true"→true,""→null. Disable if you want everything as strings. - Map to JSON — array of objects (when headers present) or array of arrays.
This tool uses Papa Parse, the most battle-tested CSV parser in JavaScript (used by millions of sites). It handles every edge case in RFC 4180 — multi-line quoted fields, escaped quotes, mixed line endings, custom delimiters, and large files. All processing happens client-side; your data never leaves your browser.
How JSON → CSV conversion works
JSON must be an array of objects (where each object becomes a row and each unique key becomes a column) or an array of arrays (where each inner array is a row). Nested objects and arrays are stringified into single cells. The first object's keys define the column order; missing keys in subsequent objects produce empty cells.
Frequently Asked Questions
Is this CSV to JSON converter free?
Completely free, no signup required. All conversion happens in your browser — your data is never sent to a server, stored, or logged.
What delimiters does this tool support?
The tool auto-detects commas, semicolons, tabs, and pipes. You can also manually override the delimiter using the dropdown — useful for unusual formats like ASCII unit separator (\\u001F) or older European exports that use the colon.
Does it handle multi-line quoted fields?
Yes. Unlike split-by-newline parsers, this tool uses a full state-machine parser (Papa Parse) that correctly handles fields containing newlines as long as they're wrapped in double quotes (per RFC 4180). Common in CSV exports from databases where a column might be a long description or address with line breaks.
Can I convert CSV without a header row?
Yes. Uncheck "First row as headers" and the tool outputs an array of arrays — every row including the first becomes a data row.
What does "Coerce numbers/booleans" do?
When enabled, the parser converts "42" → 42,"3.14" → 3.14, and "true"/"false"→ boolean. When disabled, every value is left as a string. Disable for IDs that happen to be all digits (zip codes, phone numbers) that you don't want truncated to numbers (e.g."01234" → 1234 would lose the leading zero).
How large a CSV can I process?
No server-side limit. The tool runs entirely client-side and is limited only by your device's available RAM. Files up to ~50MB typically convert within a few seconds. For multi-gigabyte datasets, use a desktop tool like jq or csvkit with streaming.
Can I convert in both directions?
Yes — click the "Swap" button to flip the converter. CSV → JSON is the most common direction (importing spreadsheet data into a web app). JSON → CSV is useful for exporting API results to Excel for analysis.
Is my data safe?
100% safe. All conversion happens in your browser via JavaScript. Nothing is uploaded, stored, transmitted, or logged. Audit the page's network tab if you want to verify — no XHR/fetch requests are made when you convert.