CSV to JSON Converter
A free tool by DeepRit, a Google Ads agency that does PPC and nothing else. We build and run Google Ads accounts so every click is accounted for. Book a free audit call
Free CSV to JSON converter. Handles quotes, commas and line breaks inside fields, detects the delimiter, and converts JSON back to CSV.
- Rows
- 0
- Columns
- 0
- Delimiter
- 0
Free, no sign-up. Runs in your browser: nothing you type is uploaded or saved.
How to use the CSV to JSON converter
Paste your CSV (copied from a file, or straight from a spreadsheet) and the converter turns it into JSON instantly. The options:
- Convert: CSV to JSON, or JSON to CSV.
- Delimiter: detect it automatically, or choose comma, semicolon, tab or pipe. Text copied from Excel or Google Sheets uses tabs, and the detector picks that up.
- First row is headings: each row becomes an object with the headings as keys. Untick it to get an array of arrays.
- Turn numbers and true/false into values:
12.50becomes the number 12.5 andtruebecomes true, instead of text. Values with leading zeros, such as postcodes like00501, stay as text so they aren't damaged.
The counts show the number of rows and columns and the delimiter used. The converter warns about a quoted field that's never closed, and rows with a different number of fields from the first. Everything runs in your browser, so your data is never uploaded.
What CSV and JSON are
CSV (comma-separated values) is the simplest table format: one row per line, with fields separated by commas. Every spreadsheet, database and business app can import and export it.
name,price,stock
Seeded rye,6.50,24
Croissant,3.25,60
JSON is a structured format used by web apps, APIs and automation tools. The same data as JSON, with headings, is a list of objects:
[
{ "name": "Seeded rye", "price": "6.50", "stock": "24" },
{ "name": "Croissant", "price": "3.25", "stock": "60" }
]
CSV is ideal for spreadsheets; JSON is what most web tools and APIs expect. Converting between them is one of the most common data jobs.
How the converter reads CSV correctly
CSV looks simple, but real files contain traps that break naive converters. This CSV to JSON converter follows RFC 4180, the standard that describes CSV:
- Commas inside fields: a field in quotes can contain commas.
"Contains seeds, nuts"is one field, not two. - Quotes inside fields: a quote inside a quoted field is written twice.
"Ask for ""extra flaky"""becomesAsk for "extra flaky". - Line breaks inside fields: a quoted field can span several lines, such as an address or a note. It stays one field.
- Empty fields:
Sourdough,5.75,0,has an empty last field, kept as an empty string. - Windows and Mac line endings: both work.
- A byte order mark at the start of the file, which Excel sometimes adds, is removed.
Choosing the delimiter
Not every "CSV" uses commas:
- Comma: the default in English-speaking countries.
- Semicolon: Excel uses semicolons in many European locales, where the comma is the decimal separator (
6,50). - Tab: what you get when you copy cells from Excel or Google Sheets. Files with tabs are often called TSV.
- Pipe (|): used by some databases and older systems.
Automatic detection looks at the first line (outside quotes) and picks the separator that appears most. If your first line is unusual, choose the delimiter yourself.
Headings and duplicate columns
With "First row is headings" on, each heading becomes a key. The converter tidies up problems that would otherwise lose data:
- Empty headings become
column_1,column_2and so on. - Duplicate headings get a number: two columns called
pricebecomepriceandprice_2, so neither is overwritten. - Spaces around headings are trimmed.
Numbers and true/false
CSV has no types: everything is text. By default the converter keeps it that way, which is safest. Tick "Turn numbers and true/false into values" to convert:
- whole and decimal numbers such as
24,-3and12.50into numbers, trueandfalseinto true and false.
It deliberately leaves alone:
- numbers with leading zeros, like postcodes, product codes and phone numbers (
00501,007), - very long numbers of 16 or more digits, like card or ID numbers, which would lose precision,
- numbers written with thousands separators or currency symbols (
1,200,$6.50), - scientific notation such as
1e5, which is more often a code than a number in business data.
JSON to CSV
Choose "JSON to CSV" to go the other way. The converter accepts:
- a list of objects: the headings are every key that appears, in the order they first appear, and missing values are left empty,
- a list of lists: each inner list becomes a row,
- a list of plain values: one column called
value, - a single object: one row.
Nested objects and lists inside a value are written as JSON text in that cell. Fields containing the delimiter, quotes, line breaks or leading and trailing spaces are quoted correctly, so the CSV opens cleanly in Excel or Google Sheets.
If your JSON isn't valid, check it first with the JSON formatter, which shows exactly where the error is.
Opening CSV in Excel without damaging it
Excel is helpful in ways that can damage data:
- Leading zeros disappear:
00501becomes501. - Long numbers turn into scientific notation:
12345678901234567890becomes1.23457E+19. - Codes turn into dates:
3-4becomes 3 April. - Accented characters break if the file isn't read as UTF-8.
To avoid this, use Data → From Text/CSV (or Get Data) in Excel rather than double-clicking the file, choose UTF-8, and set sensitive columns to Text. Google Sheets' File → Import offers similar options.
Everyday uses
- Importing products into an online shop or app that accepts JSON.
- Sending spreadsheet data to an API, automation tool or AI tool.
- Turning a form export into JSON for a developer.
- Exporting app data to a spreadsheet by converting JSON to CSV.
- Cleaning lists: after converting, remove duplicate lines or sort lines, and pull contacts out with the email extractor.
Privacy
Spreadsheets often hold customer names, emails, orders and prices. This CSV to JSON converter runs entirely in your browser: nothing you paste is uploaded or stored, and closing the tab clears it.
Common CSV problems and fixes
- Everything ends up in one column: the delimiter wasn't detected. Choose it yourself: semicolon for many European Excel exports, tab for data copied from a spreadsheet.
- "A quoted field is never closed": a field starts with a quote but never ends with one, so the rest of the file is read as one field. Look for a stray quote mark, often in a note or product name, and double it (
"") or remove it. - Rows with different numbers of fields: usually an unquoted comma inside a field, such as an address. Quote that field in the source, or export the file again with "quote all fields" turned on.
- Strange characters like é: the file wasn't saved as UTF-8. Save or export it as "CSV UTF-8" and copy again.
- Headings repeated in the middle: some exports repeat the header row on every page. Remove the extra header lines before converting.
The converter's warnings point you to the first two problems, which are the ones that silently scramble data.
JSON shapes other tools expect
Different tools want JSON in slightly different shapes. The converter's output, a list of objects, is the most common, but check what your tool needs:
- A list of objects (
[{...}, {...}]): most APIs, automation tools and import screens. - A list of lists: some charting tools and spreadsheets' APIs. Untick "First row is headings" to get this.
- An object with a key around the list, such as
{"products": [...]}. Wrap the output by hand: type{"products":before it and}after it, then check it with the JSON formatter.
A worked example
A bakery wants to load its product list into a new ordering app that imports JSON. The owner copies three columns from the price spreadsheet and pastes them into the converter. It detects tabs, reads 3 rows and 4 columns, and produces a list of objects. One product's note contains a comma and quotes ("Ask for ""extra flaky"""), and the converter keeps it as one field, with the quotes restored.
The app needs prices as numbers, so the owner ticks "Turn numbers and true/false into values": 6.50 becomes 6.5, but the product code 007 stays as text. The import works first time.
Need more customers from Google?
This tool is free and runs in your browser. If your business also needs more leads or sales, Google Ads is where people search with their wallet out. That is the whole job of DeepRit: a PPC-only agency that sets up and runs Google Ads accounts so every click is accounted for. You keep full ownership of your account, get a written report every week, and can stop at any time. See our pricing or ask for a free audit.
Frequently asked questions
How do I convert CSV to JSON?
Paste the CSV into the converter. With "First row is headings" on, each row becomes an object, ready to copy as JSON.
Does it handle commas inside fields?
Yes. Fields in double quotes can contain commas, quotes (written twice) and line breaks, following the CSV standard.
Can it convert JSON back to CSV?
Yes. Choose JSON to CSV and paste a list of objects or lists. Fields that need quotes are quoted automatically.
Will it keep leading zeros?
Yes. Values stay as text unless you turn on number conversion, and even then numbers with leading zeros stay as text.
What if my CSV uses semicolons?
The converter detects semicolons, tabs and pipes automatically, or you can choose the delimiter yourself.
Is the CSV to JSON converter free?
Yes. It's free with no sign-up, and it runs entirely in your browser.
Free PPC audit
See where your ad budget leaks.
We look at your Google Ads account before the call, then walk you through what we'd fix first, in dollars. No obligation, no hard sell.