CSV to JSON converter
Paste CSV below. The first row becomes the keys, quoted fields are handled and the delimiter is detected for you.
Free · no signup Runs in your browser
How do I convert CSV to JSON?
Paste the CSV into the box. The tool reads the first row as column names and turns each following row into a JSON object, giving an array you can copy or download. The delimiter is detected automatically, so files that use semicolons, which Excel produces in many French and European settings, work as well as commas and tabs. Quoted fields that contain commas, quotes or line breaks are read correctly.
What a clean conversion needs
CSV looks simple and is full of edge cases. A field with a comma in it must be wrapped in quotes, a quote inside a quoted field is written twice, and a quoted field can run over several lines. A naive split on commas breaks on all of these. This converter reads the file as RFC 4180 describes, so an address such as "123 Main St, Unit 4" stays one field and a line break inside a note stays in the note. It also removes the invisible byte-order mark that Excel puts at the start of a UTF-8 file, so the first key is not corrupted.
Excel in French-language and many European settings saves CSV with semicolons because the comma is the decimal mark. The delimiter selector is set to detect that for you; choose a delimiter by hand if the first line is unusual. 'Convert numbers and true/false' turns plain numbers and the words true and false into JSON numbers and booleans; it deliberately leaves long digit strings and values with leading zeros as text, so that postal codes, phone numbers and IDs are not damaged.
It runs in your browser. Your data is never uploaded, and there is no sign-up.
Using the JSON
The output is an array of objects when 'first row is the header' is on, and an array of arrays when it is off. Pick the indentation, copy it or download it as a file. If you need the reverse, use the JSON to CSV converter. To check or tidy a result, use the JSON formatter. Because the work is done on your device, the tool suits data that should not leave your computer, such as customer lists.
When to use it
- Moving spreadsheet data into a web page, script or API
- Preparing test data
- Converting an export from a bank, shop or form tool
- Turning a table copied from a spreadsheet into JSON
Mistakes it helps you avoid
- Splitting on commas and breaking quoted fields.
- Losing leading zeros from postal codes or IDs.
- Treating a semicolon-separated file as one column.
- Keeping the byte-order mark in the first key.
The formula
How the answer is worked out.
1. Strip a byte-order mark and choose the delimiter (detected from the first line, or the one you pick).2. Read fields as RFC 4180 describes: quotes protect delimiters and line breaks, and "" is a quote.3. With a header row, build an object per row using the header names as keys.4. Optionally convert plain numbers and true/false; write JSON with the indentation you chose.
The CSV reader follows RFC 4180: a field may be quoted, a quote inside a quoted field is written twice, and a quoted field may contain commas and line breaks. Quoted numbers are still read as text only when 'convert numbers' is off. Numbers with more than 15 digits, leading zeros or a plus sign stay text so that identifiers such as postal codes and phone numbers are not changed.
Example: three columns
You paste a header row and one data row, where one value contains a comma.
- CSVname,city,age · "Smith, Ana",Calgary,34
- JSON[{"name": "Smith, Ana", "city": "Calgary", "age": 34}]
One object, with the comma kept inside the name and age as a number
Turn off number conversion to keep 34 as text.
Terms on this page
- CSV
- Comma-separated values: a plain-text table, one row per line.
- JSON
- A text format for structured data using objects, arrays, strings, numbers and booleans.
Common questions
How do I convert Excel to JSON?
Save or copy the sheet as CSV (or paste the cells, which arrive tab-separated) and paste it here.
Why did my file split into one column?
The delimiter may be a semicolon or tab. The tool detects it from the first line; choose it by hand if needed.
Are leading zeros kept?
Yes, values such as 02134 stay text.
Is there a size limit?
Only your browser's memory. A few megabytes is fine.
Is my data uploaded?
No.
Is anything I enter sent to a server?
No. The calculation happens in your browser and nothing you type leaves your device.
What to work out next
Where these numbers come from
- IETF — RFC 4180: Common Format and MIME Type for CSV Files How quoted fields, doubled quotes and line breaks inside quotes work in CSV.
- IETF — RFC 8259: The JavaScript Object Notation (JSON) Data Interchange Format The JSON syntax the output follows.
Last verified 2026-10-25 The method on this page is checked against the sources above at least once a year. Spotted something out of date? Tell us and we will fix it.
Related tools
JSON to CSV
Paste a JSON array and get CSV for a spreadsheet, with all keys as columns, proper quoting and an optional Excel byte-order mark.
Open toolJSON formatter
Paste JSON to check it is valid, then pretty-print, minify or sort its keys, and copy the result.
Open toolText compare
Paste two versions of a text and see what was added and removed, by word or by line.
Open toolRemove duplicates
Paste a list and remove repeated lines, with options to ignore case, trim spaces, drop blanks and sort.
Open toolBox shadow generator
Adjust the offset, blur, spread, colour and opacity of a CSS box shadow, see it live and copy the CSS.
Open toolPassword generator
Create strong random passwords of any length with your choice of characters. Made in your browser; nothing is sent or saved.
Open tool🧰 Developer and web tools
Small developer and web jobs done in your browser. What you paste or choose is never sent anywhere.
See all 24 tools in this section