CSV to JSON Converter

Paste CSV and get a JSON array of objects instantly — the header row becomes the keys. Flip the toggle to convert JSON back to CSV. Runs in your browser, nothing uploaded.

CSV input
JSON output

What does this tool do?

This free CSV to JSON converter turns a CSV table into a JSON array of objects as you type, and converts JSON back to CSV with the reverse toggle. It runs entirely in your browser — nothing you paste is uploaded — so it is safe for any data. If you mainly need the other direction — a JSON array flattened into a spreadsheet — the dedicated JSON to CSV page opens ready for that.

How the conversion works

For example this CSV:

name,age,city
Ann,30,Paris
Cy,41,"Oslo, NO"

becomes:

[
  { "name": "Ann", "age": 30, "city": "Paris" },
  { "name": "Cy", "age": 41, "city": "Oslo, NO" }
]

Real-world examples

The most common reason to convert CSV to JSON is to take a spreadsheet or a CRM/analytics export and feed it to an API or a script that expects JSON. Type detection makes the output ready to use rather than all-strings — for example:

name,active,score,zip
Ann,true,9.5,007
Bob,false,,90210

becomes:

[
  { "name": "Ann", "active": true, "score": 9.5, "zip": "007" },
  { "name": "Bob", "active": false, "score": "", "zip": "90210" }
]

Note the details: true/false became booleans, 9.5 a number, the empty cell an empty string, and 007 stayed a string so the leading zero survives.

Convert CSV to JSON in code (Python, CLI)

This page is the zero-install option; inside a script:

How to use it

Type detection rules

The converter infers a JSON type for each cell so the output is ready to use rather than all-strings. The rules are deliberately conservative:

So an ID, a ZIP code, or a version like 1.0 is usually kept as text automatically — the leading-zero and non-numeric rules protect them — but you can always quote and clean up afterwards if needed.

Common uses

FAQ

Does it use the first row as keys?

Yes. The first CSV row is the header; each following row becomes a JSON object keyed by those headers.

Are numbers and booleans detected?

Yes. Values that look like numbers, true, false, or null become the matching JSON type; everything else stays a string. Leading-zero values stay strings.

Does it handle commas inside quoted fields?

Yes. Quoted fields may contain commas, newlines, and escaped double quotes, following the standard CSV (RFC 4180) format.

Can I convert JSON back to CSV?

Yes. Switch the toggle to JSON → CSV and paste a JSON array of objects to get a CSV table back.

Does it support tab- or semicolon-separated files?

This converter expects comma-separated values. For a TSV or semicolon-separated file, replace the delimiter with commas first, then paste it in.

Does it work offline?

Yes. Once the page has loaded the conversion runs entirely on your device, with no network connection.

Is my data uploaded?

No. Everything runs in your browser; nothing you paste leaves your device.

More format converters