CSV ↔ JSON Converter
Convert between CSV and JSON array format instantly
No data is sent to any server — everything runs client-side
CSV Input
Paste your CSV data
📁 Click to upload or drag & drop a CSV file
Supports .csv, .tsv, .txt
JSON Output
Converted result
What Is CSV?
CSV (Comma-Separated Values) is one of the oldest and most universal data formats. Each line represents a record, and fields within a record are separated by commas (or other delimiters like tabs or semicolons). The first line usually serves as a header row defining column names.
CSV is the lingua franca of spreadsheets, databases, and data pipelines. Every spreadsheet application (Excel, Google Sheets, LibreOffice Calc) can import and export CSV. It's the most common format for data export from SQL databases, analytics platforms, and government data portals.
CSV to JSON Mapping
When converting CSV to JSON with headers enabled, each row becomes a JSON object where header names become keys:
CSV Input
name,age,city Alice,30,New York Bob,25,London
JSON Output
[
{"name":"Alice","age":30,"city":"New York"},
{"name":"Bob","age":25,"city":"London"}
]When to Convert
Data API Integration
Import CSV exports from spreadsheets or databases into JSON-based APIs, NoSQL databases (MongoDB, CouchDB), or Elasticsearch indices.
Frontend Data Visualization
Convert CSV datasets to JSON for charting libraries (D3.js, Chart.js, Recharts) that expect JSON array input.
Spreadsheet Export
Export JSON API responses to CSV for analysis in Excel, Google Sheets, or pandas DataFrames.
ETL Pipelines
Prototype data transformations between CSV flat files and JSON documents before writing production pipeline code.
Common CSV Pitfalls
Commas inside values
Values containing commas must be enclosed in double quotes: "New York, NY". This tool handles quoted fields correctly.
Line breaks in values
Multi-line values must be quoted. Unquoted line breaks split the record incorrectly.
Encoding issues
Excel exports CSV as Windows-1252 by default, not UTF-8. Non-ASCII characters (accents, emoji) may appear corrupted. Save as "CSV UTF-8" in Excel.
Related Tools
How to Use the CSV ↔ JSON Converter
Select conversion direction
Choose "CSV → JSON" to convert CSV data to a JSON array, or "JSON → CSV" to export JSON to CSV spreadsheet format.
Paste your CSV or upload a file
Paste CSV content directly into the text area, or drag-and-drop a .csv, .tsv, or .txt file onto the upload zone.
Choose header options
Toggle "First row is header" to control whether the first CSV row is used as JSON property names. With headers: each row becomes a named object. Without: each row becomes an array.
Convert and copy
Click Convert. The resulting JSON or CSV appears on the right. Use the Copy button to copy the output.
Frequently Asked Questions
Can I upload a .csv file directly?▼
Yes. Drag-and-drop a .csv, .tsv, or .txt file onto the upload zone, or click the upload area to browse for a file. The file is processed entirely in your browser.
What happens to quoted fields with commas inside?▼
Quoted fields are handled correctly. A value like "New York, NY" (with the quotes) is parsed as a single field, not split on the internal comma. This follows the RFC 4180 CSV standard.
My CSV uses semicolons instead of commas. Does it work?▼
The parser uses PapaParse which automatically detects the delimiter. Semicolon-delimited files from European Excel exports are handled automatically.
What does the "First row is header" toggle do?▼
When enabled (default), the first CSV row is used as property names in the JSON objects. When disabled, each row becomes a JSON array of values without named keys.
Is my data sent to a server when I convert?▼
No. All conversion happens entirely in your browser. Your data never leaves your device and is not stored or logged anywhere.
Why do some numbers appear as strings in the JSON output?▼
By default, PapaParse uses dynamic typing and converts numeric-looking values to numbers. If you see unexpected strings, check whether the values have leading/trailing spaces or special characters.
Further Reading
Explore our developer blog for in-depth guides on data formats.
Built by JDApplications