Skip to content

Convert CSV to JSON

Turn CSV or TSV data into a JSON array with type detection and nested keys, converted in your browser.

Convert to
Runs in your browser · no uploadHow it works

How to use CSV to JSON

  1. 1

    Paste or drop the CSV

    Paste rows copied from a spreadsheet or drop a .csv/.tsv file; the delimiter is detected for you.

  2. 2

    Check the header and types

    Confirm the first row holds the column names and that numbers and dates were recognized in the preview.

  3. 3

    Copy the JSON

    Pick an array of objects or arrays, nest dot-named columns if you like, then copy or download the .json.

Limits and Pro

CSV and TSV files up to 500 MB with no row limit.

Files up to 4 GB. See Pro

About CSV to JSON

CSV to JSON turns comma-separated (or semicolon-, tab- and pipe-separated) text into JSON you can drop into JavaScript, a REST API fixture, a NoSQL import or a config file. The header row supplies the property names, so a sheet with name, email and plan columns becomes an array of objects with exactly those keys.

CSV has no types — everything is text — so the converter decides what each value should be in JSON. Whole and decimal numbers become JSON numbers, true and false become booleans, ISO dates such as 2024-03-31 are kept as date strings, and empty cells become null (or are left out entirely if you prefer smaller objects). Values that only look numeric, such as postal codes with a leading zero, phone numbers and 16-digit IDs, stay strings so nothing is silently rounded.

Column names with dots, like customer.address.city, can be rebuilt into nested objects — the usual way to round-trip JSON through a spreadsheet. Quoted fields containing commas, quotes or line breaks follow the RFC 4180 rules, and exports saved by older Excel versions in Windows-1252 are decoded so accented names survive.

Paste a few rows to try it instantly, or drop a file with hundreds of thousands of lines; parsing happens in a background worker so the page stays responsive.

Privacy

The CSV you paste or drop is parsed inside this browser tab and never sent to a server; pasted text isn't stored once you leave the page.

CSV to JSON: frequently asked questions

How are numbers and empty cells written in the JSON?
With type detection on, 42 and 3.14 become JSON numbers, true/false become booleans and empty cells become null. Turn on “Leave out empty cells” to omit those keys instead. Values with leading zeros or more than 15 digits stay strings, because converting them to numbers would change them.
My CSV uses semicolons — will that work?
Yes. Semicolon-separated files, common in countries that use a decimal comma, are detected automatically, as are tabs and pipes. If detection guesses wrong for an unusual file, choose the delimiter manually in the input options and the preview updates immediately.
Can I get JSON without a header row?
If your CSV has no header, switch off “First row is the header”; columns are then called Column 1, Column 2 and so on. Alternatively choose the array-of-arrays shape, which writes each row as a plain list and needs no property names at all.
How do I create nested JSON from a CSV?
Name the columns with dots — for example user.name and user.email — and keep “Nest dot keys” on. Each row then becomes {"user": {"name": …, "email": …}}. Numeric segments such as tags.0 and tags.1 turn into arrays, which reverses the flattening done when JSON is exported to CSV.
Is JSON Lines (NDJSON) output available?
Not directly — the output is a single JSON document. Choose the compact (non-pretty) array-of-objects output if you need one object per line after a small edit, or convert the other way: JSON Lines input with one object per line is read automatically and turned into a table.

Other tasks with this tool