Convert CSV to JSON
Paste or drop a CSV and get clean JSON. Choose a list of objects, a list of lists, or one object keyed by any column. Numbers stay numbers, and a 19-digit ID keeps every digit.
- Free, no sign-up
- Runs in your browser. Your files never leave your device.
- Updated
Arrow keys move between cells. Enter on a column name opens its options.
Paste CSV, drop a file, or try a sample
CSV, TSV, Excel, JSON, YAML, Markdown and HTML tables, and SQL inserts all work. Big files are fine.
is loaded.
Its text stays out of the editor so the page stays quick. Use the table and the column tools to change it.
An Excel workbook, ready to download
One sheet with a bold, frozen header row and filters on every column.
The result shows here
Pick a format above. Copy it or download the file once your table is in.
Your data stays on this device. Reading, converting and saving all happen in this browser tab.
To convert CSV to JSON, paste the CSV or drop the file above. Choose the JSON shape you need, and press Copy or Download. The header row becomes the keys, and each following row becomes an object. Columns that hold only numbers or true/false are written as real JSON values.
How do I convert CSV to JSON?
- Paste your CSV into the editor, or drop a .csv, .tsv or .xlsx file on it.
- Check the Table tab. The first row should be the column names. If your file has none, untick Header row, and the keys become
column_1,column_2and so on. - On the JSON tab, pick a shape and whether to indent it.
- Press Copy (or Ctrl/⌘ + Enter) to copy the JSON, or Download for a .json file.
Which JSON shape should I pick?
| Shape | Looks like | Use it for |
|---|---|---|
| List of objects | [{"id": 1, "name": "Mira"}] | APIs, JavaScript, most tools. The usual choice. |
| List of lists | [["id", "name"], [1, "Mira"]] | Chart and spreadsheet libraries. It is the smallest output. |
| Keyed by a column | {"1": {"name": "Mira"}} | Looking rows up by ID. |
| JSON Lines | {"id":1,"name":"Mira"}, one per line | Bulk loads, logs and streaming. |
How does it decide what is a number?
CSV has no types. Every cell is text. The converter reads the whole column before deciding. If every value is a plain number like 42, -3.5 or 1e6, the column is written as JSON numbers. Columns of true and false become booleans. Anything else, including 007, 3,50 and $12, stays a string. Untick Numbers as numbers to keep every value a string.
Would a script do the same?
For a one-off job, Python’s standard library gets close: json.dump(list(csv.DictReader(open("in.csv", encoding="utf-8"))), open("out.json", "w")). But it writes every value as a string, and you have to know the file’s encoding and delimiter. The converter works those out and types the columns for you.
Need the reverse?
The JSON to CSV converter flattens nested JSON into columns. If your JSON does not parse, the JSON Formatter points to the exact line and column.
Questions
Why are some numbers in quotes in my JSON?
A column becomes JSON numbers only when every value in it is a number. One value like "n/a" or "12 kg" keeps the whole column as strings, so the JSON has one type per key. Values with a leading zero, such as 00412, also stay strings, because turning them into 412 would lose information.
How do I get an object keyed by ID instead of a list?
Set Shape to “Keyed by a column” and pick the column, such as id. Each row becomes { "1001": { … } }. If two rows share a key, the later row wins and keeps the first row’s position.
What happens to empty cells?
By default they become empty strings (""). Tick “Blanks as null” to write null instead, which most databases and APIs treat as “no value”.
Can I get JSON Lines (NDJSON)?
Yes. Pick JSONL in the output formats. Each row becomes one compact JSON object on its own line. This suits BigQuery, Elasticsearch bulk loads and streaming tools.
Are large IDs rounded?
No. JavaScript rounds whole numbers above 9,007,199,254,740,991, but the converter writes the digits from your CSV straight into the JSON. A 64-bit ID keeps every digit.
Is the CSV uploaded?
No. Parsing and conversion run in a background thread of this page, on your device. Nothing is sent to a server. There is no account and no file-size paywall.
More free tools
- CSV Converter Convert CSV to and from JSON, Excel, Markdown and more.
- CSV to Excel Get a real .xlsx file. Leading zeros and accents stay.
- JSON to CSV Turn a JSON array into CSV for Excel or Google Sheets. Nested fields are flattened.
- JSON Formatter Format, check, browse and convert JSON, even very large files.
- Diff Checker Compare two texts or files and see every change, side by side.
Save what you find in one click.
Kortex is a Chrome extension for Gemini Notebook (formerly NotebookLM). It sends AI chats, web pages, posts and YouTube videos into the notebook you pick. It keeps your notebooks organized. It exports them back out.
No card needed.