CSV to JSON

Convert CSV rows into JSON objects for APIs, scripts and data processing. A simple browser-based CSV to JSON converter.

Ad space — place your AdSense unit here after approval.
Your result will appear here.

CSV to JSON online

Turn CSV text into a JSON array of objects — the first row becomes the keys, every following row an object — for APIs, fixtures and scripts that would rather speak JSON.

Quick answer: Paste CSV with a header row when you need records in JSON object form.

How to use this tool

  1. Paste your CSV into the input box, keeping the header row as the first line.
  2. Click Run Tool. Quoted cells, embedded commas and line breaks inside quotes are handled by a real CSV parser, not a naive split.
  3. Copy the JSON array from the result panel, or use Copy Result.

Common uses

Preparing seed data and API fixtures from spreadsheets, cleaning exports from legacy systems before import, converting mailing lists and product feeds into JSON for a script, and eyeballing a CSV's structure as objects before writing the real import code.

How it works

The parser follows the usual CSV rules: a cell wrapped in double quotes can contain commas, line breaks and quotes themselves (written doubled, as ""). The first row is read as headers; each later row becomes one object keyed by those headers. Every value stays a string — the converter does not guess types, so 30 arrives as "30", which keeps leading zeros and IDs intact. Rows shorter than the header are padded with empty strings; blank lines are skipped.

Worked example

Paste:

name,age,city
Ana,30,Berlin
"Bo, Jr.",25,Oslo

and the result is:

[
  { "name": "Ana", "age": "30", "city": "Berlin" },
  { "name": "Bo, Jr.", "age": "25", "city": "Oslo" }
]

Note the quoted comma surviving inside the second name, and the ages staying strings.

Privacy and browser processing

Your CSV is parsed in your browser with JavaScript — it is never uploaded or stored.

Frequently asked questions

Why are all the values strings, even the numbers?

Because CSV itself has no types — every cell is text. Guessing would corrupt data like phone numbers, leading-zero postcodes and long IDs, so the converter preserves the text exactly and leaves typing to your code.

What happens if a header name repeats?

Later columns overwrite earlier ones with the same header, because a JSON object cannot hold two identical keys. Rename duplicate headers in the CSV first if both columns matter.

Can a cell contain a line break?

Yes — wrap the cell in double quotes and the parser keeps the break inside the value. The same quoting protects commas inside cells, and a quote inside a quoted cell is written twice.

My rows have more cells than the header. Where do they go?

Extra cells beyond the header count are dropped, since there is no key to hold them. Add header names for them, or trim the rows, before converting.

Is my CSV uploaded?

No. The conversion runs in your browser with JavaScript; the data never leaves the page.

Related tools

Ad space