CSV to JSON Converter
Convert CSV files or pasted data to a JSON array instantly. Supports quoted fields, custom delimiters and pretty-print output. Free, browser-based.
What Is a CSV to JSON Converter?
A CSV to JSON converter reads delimiter-separated text — the format produced by spreadsheet applications like Excel, Google Sheets and LibreOffice Calc — and transforms it into a JSON array that JavaScript, Python, APIs and databases can consume directly. Instead of manually writing code to parse columns and rows, paste your CSV and get structured JSON in one click.
How the Conversion Works
When First row is header is enabled, each subsequent row becomes a JSON object whose keys come from the header row: [{"name":"Alice","age":"30"}]. Without headers, each row becomes a flat array of values: [["Alice","30"]]. Quoted fields, fields containing the delimiter, and doubled-quote escapes are all handled correctly per RFC 4180.
Supported Delimiters
| Delimiter | Symbol | Common Source |
|---|---|---|
| Comma | , | Excel, Google Sheets, standard CSV exports |
| Semicolon | ; | European locale Excel exports (decimal comma regions) |
| Tab | \t | TSV files, cells copied directly from a spreadsheet |
| Pipe | | | SQL dumps, custom data exports, log files |
Output Options
- 2 spaces — readable indented JSON, good for pasting into config files or code.
- 4 spaces — broader indentation preferred in some Python and Java projects.
- Minified — single-line compact JSON with no whitespace, smallest possible output for API payloads.
Common Use Cases
- Converting spreadsheet exports to JSON for REST API requests or database inserts.
- Transforming sales or analytics reports into structured data for JavaScript applications.
- Preparing CSV data for upload to NoSQL databases like MongoDB or Firestore.
- Moving data between tools that speak different formats without writing any code.
Why CSV Values Come Out as Strings
CSV is a text-only format with no type information — every value is technically a string. When this converter produces JSON, numbers like 42 and booleans like true remain wrapped in quotes ("42", "true") to faithfully represent the CSV source without making assumptions. To cast specific columns to their correct types, post-process the output in JavaScript with a JSON.parse reviver function, or run jq on the command line to convert specific keys. If you need the reverse operation — turning JSON back into CSV — use the JSON to CSV Converter.