// converters

CSV to JSON.

Parse CSV (with quoted fields) and produce an array of JSON objects using the first row as headers.

Client-sideStrict quotingNo upload

CSV input

JSON output

How CSV-to-JSON conversion works.

CSV is flat and row-based; JSON is hierarchical and type-aware. This tool parses each CSV row into an object using the header row as keys, then outputs the result as a pretty-printed JSON array. The first row must contain column headers — these become the JSON keys for each element.

The tool handles quoted fields, escaped delimiters, and multi-line values per RFC 4180. It also auto-detects types: numbers become JSON numbers, true/false become booleans, empty cells become null, and everything else stays as a string.

When to use CSV-to-JSON.

APIs and JavaScript. Most web APIs accept and return JSON. Convert a CSV export into a JSON array so your front-end code can fetch, render, or post it without a server-side import step.

Document stores. MongoDB, Elasticsearch, and most NoSQL databases ingest JSON directly. Convert a CSV dump of your table into documents you can insert with a single command.

Data visualization. Libraries such as D3.js, Chart.js, and Observable expect JSON arrays of objects. Convert once and feed the array straight into your chart configuration.

Delimiter options.

Comma (,) — the standard CSV delimiter. Used by most tools. Semicolon (;) — common in European locales where comma is the decimal separator. Pipe (|) — used in some data pipelines and when data contains both commas and semicolons.

Choose the delimiter that matches your input. If your CSV file was exported from Excel in a European locale, try semicolon. If you're pasting pipe-delimited data from a log file, use pipe.

CSV parsing and RFC 4180.

RFC 4180 is the official standard for CSV format. It defines how fields containing commas, quotes, or newlines should be escaped: enclose the field in double quotes and double any quotes within the field. This tool follows RFC 4180 strictly, so it correctly handles quoted fields, escaped delimiters, and multi-line values.

Many tools export CSV that does not fully comply with RFC 4180 — they may use single quotes, backslash escapes, or inconsistent quoting. This tool is lenient where possible but strict where it matters, ensuring your JSON output is always valid regardless of the input quirks.

Data migration workflows.

Spreadsheet to web app. Export your spreadsheet as CSV, convert it to JSON, and drop the array into your application's seed data or fixture files. Every record keeps the column names from your sheet.

Database to API. When migrating records into an API-backed system, export the tables as CSV, convert them to JSON, and commit the result next to your application code so it can be reviewed in pull requests.

Reports and pipelines. Many services export CSV reports. Convert them to JSON once, and the same file can power a dashboard, an import script, or a data pipeline.

Type detection and JSON output.

The converter detects data types automatically: integers and decimals become JSON numbers, true and false become booleans, empty cells become null, and everything else stays a quoted string. Values with leading zeros — IDs, zip codes, account numbers — stay strings so no data is lost.

The output is pretty-printed with two-space indentation, which is what you want for code review and version control. If you need a compact payload, run the result through the JSON minifier tool afterward.

FAQ

How do I convert a CSV with headers to a JSON array of objects?

Paste the CSV here and copy the result — the conversion runs in your browser. From the command line, use Python (csv.DictReader plus json.dump), Miller (mlr --c2j), or csvkit (csvjson).

How do I handle CSV cells with commas inside quotes?

RFC 4180 parsers handle this for you: a field wrapped in double quotes may contain commas, line breaks, and doubled quotes (""). Never split a CSV line on commas by hand.

Can I convert a CSV to JSON without headers (use column index as key)?

This tool always treats the first row as keys, so add a header row first. Miller (mlr --c2j --no-header-row) does it directly and names the columns c1, c2, and so on.

How do I convert CSV with dates/numbers to JSON preserving types?

Numbers, booleans, and empty cells are inferred automatically. JSON has no date type, so parse dates yourself and emit ISO 8601 strings (for example 2026-09-22) before serialising.

Is my data uploaded to a server?

No. The conversion runs entirely in your browser, so the CSV you paste never leaves your device.