1xA2ZOne Data. Any Format.
Live syncLocal-first · no data upload

Convert CSV to JSON

Paste your CSV into the Quick paste box. The tool reads commas, double quotes and line breaks inside cells correctly and writes JSON on the right. Copy it or download the file.

Runs entirely in your browser. Your data is never uploaded. Tiếng Việt

01

Spreadsheet

SheetsExcelCSVTSV
✦ Quick pasteSheets / Excel, CSV, TSV, Markdown, JSON, HTML, LaTeX, wiki…
0 rows · 0 columnsSelected cell: A1
02

Live Output

Markdowntwo-way
SyncedEdit directly; the table on the left updates itself
0 characters
Every change is processed right in your browserReady · LocalUTF-8 · by xuanhieu.org

When you need to convert CSV to JSON

You convert CSV to JSON when you feed an API, a config file, a static site or a JavaScript app. The hard part is rarely splitting columns. It is cells that contain commas, order IDs with leading zeros, and numbers that turn into strings or the other way around. This page opens with an array of objects and numbers exported as numbers; change both in the options panel if your target expects something else.

How to do it

  1. Use the JSON tab on the right (this page already selected it). The sample table in the grid is only there to show the result; replace it with your own.
  2. Paste your CSV into the Quick paste box, or press Import file and choose a .csv file. When you paste, tabs or commas are detected and the data lands in the grid.
  3. Check the grid: the column and row counts should match your file. If everything sits in one column, your file may use semicolons; see the pitfalls below.
  4. Open ⚙ Options on the JSON tab, pick the output shape and decide whether numbers should stay numbers.
  5. Press Copy result to paste into code, or Download file to get a .json file.

A real example

The order ID 00123 stays a string, so its leading zeros survive, while the amounts stay quoted: 450.00 is not a standard number because its trailing zeros would be lost, so number export leaves it as a string. The comma inside the note and the double quotes inside another cell were handled on input.

Input · CSV

Order ID,Customer,Amount,Note
00123,Anna Reed,450.00,"Rush delivery, call first"
00124,Ben Cole,1250.00,"Includes ""gift wrap"""
00125,Cara Lin,299.50,

Result · JSON

[
  {
    "Order ID": "00123",
    "Customer": "Anna Reed",
    "Amount": "450.00",
    "Note": "Rush delivery, call first"
  },
  {
    "Order ID": "00124",
    "Customer": "Ben Cole",
    "Amount": "1250.00",
    "Note": "Includes \"gift wrap\""
  },
  {
    "Order ID": "00125",
    "Customer": "Cara Lin",
    "Amount": "299.50",
    "Note": ""
  }
]

Options worth changing

Output shape
Array of objects uses your CSV headers as keys, which is what most APIs expect. Pick array of arrays to keep the header as a data row, or array per column for charting libraries.
Output numbers as numbers
Turn it on and cells like 450 or 3.5 become JSON numbers; a value such as 450.00 with trailing zeros stays a string. IDs with leading zeros such as 00123 always stay strings, so you cannot lose the zeros by accident.
Minify (single line)
Use it for URLs, environment variables or the smallest file. Leave it off when you read the output or compare it in Git.
Root object name
Type orders and the whole array is wrapped as {"orders": [...]}, which suits APIs that reject a bare array.

Common problems

Limits

Frequently asked questions

My CSV uses semicolons. Will it work?

The Quick paste box auto-detects tabs and commas, not semicolons. For a semicolon file, set Delimiter to semicolon on the CSV tab and paste into the CSV result area.

Is my data uploaded to a server?

No. Reading the CSV and building the JSON happen in your browser, and the page makes no network request to send data anywhere.

How do I get real numbers in the JSON?

Open ⚙ Options on the JSON tab and turn on number export. Only standard numbers convert; IDs with leading zeros stay strings.

Can I get JSON keyed by column?

Yes. Choose array per column as the output shape and each header becomes a key holding the list of that column's values.

Can I go back from JSON to CSV?

Yes. Paste the JSON into the Quick paste box and open the CSV tab. See the JSON to CSV page under related conversions.

Related conversions

1xA2Z · Guide

Table statistics