Skip to content

CSV to JSON Converter - Free, Handles Quotes & Tabs

CSV to JSON converter that handles quoted commas, tabs from Excel, and number types. Copy or download the JSON instantly. Nothing is uploaded.

By Updated Runs in your browser

CSV JSON Converter guide

Paste CSV from a spreadsheet export, a database dump, or Excel and get clean JSON: an array of objects keyed by your header row, with numbers and booleans typed correctly.

How the conversion works

CSV is a grid of text. JSON is structured data. The converter reads the first row as field names, then turns every row below it into an object where each header maps to the value in the same column. Three rows of data under a header produce a JSON array with three objects.

Parsing is done character by character, not by splitting on commas. That matters because a naive split breaks the moment a value contains a comma, which happens constantly with addresses, company names ("Acme, Inc."), and currency formatted as "1,200". The parser tracks whether it is inside a quoted field and only treats a delimiter as a column break when it is outside quotes.

The CSV rules that trip people up

CSV has a loose standard, RFC 4180, and most exports follow it. The rules worth knowing: a field that contains the delimiter, a double quote, or a line break must be wrapped in double quotes. A literal double quote inside a quoted field is written twice, so He said "hi" becomes "He said ""hi""". Line breaks inside quotes are part of the value, not a new row.

Delimiters vary. US Excel saves with commas. Excel in Germany, France, and much of Europe uses semicolons because the comma is their decimal separator. Copying cells out of Excel or Google Sheets puts tabs between columns. The converter checks the first line and picks tab, semicolon, or comma automatically, so you can paste from any of them without changing settings.

Worked example

Input: a header of name,city,age,member followed by the row Ava Johnson,"Austin, TX",34,true. The output is one object: name is "Ava Johnson", city is "Austin, TX" (the comma survives because of the quotes), age is the number 34, and member is the boolean true.

Turn off type conversion and the same row gives "34" and "true" as strings. That is the safer choice if you are feeding a system that validates types itself, or if a column mixes numbers and text (product SKUs like 1001 and 1001-B, for example), because you do not want half the column to be numbers and half strings.

Type conversion, and why ZIP codes stay strings

With conversion on, a value becomes a number only if it looks exactly like a JSON number: optional minus sign, digits, optional decimal part, optional exponent. "42", "-3.5", and "1e6" convert. "$42", "42%", and "1,200" do not, because guessing wrong corrupts data silently.

Leading zeros are the classic trap. The Boston ZIP code 02134 becomes 2134 if you treat it as a number, and that is a different place. Phone numbers, account numbers, and US ZIP codes often start with zero, so any value with a leading zero stays a string. "true" and "false" (any capitalization) become booleans, "null" and empty cells become null.

Common mistakes

Duplicate header names. If two columns are both called "name", the second overwrites the first in each object. Rename one before converting, or switch to array-of-arrays output, which keeps every column.

A byte order mark from Excel. Files saved as "CSV UTF-8" in Excel start with an invisible character that can end up glued to your first key. If your first field comes out as "\uFEFFname", re-save the file or delete and retype the first header.

Mixed line endings are handled (Windows \r\n, Unix \n, old Mac \r), and blank lines are skipped, so you do not need to clean those up first.

When to use a different tool

For a one-off conversion, pasting here is faster than writing code. For something that runs every day, script it: Python's csv.DictReader plus json.dumps is five lines, and Node has csv-parse. For files over roughly 100 MB, use a streaming command-line tool like Miller (mlr --icsv --ojson cat file.csv) so you are not holding the whole file in browser memory. Going the other way, from an API response to a spreadsheet, is what the JSON to CSV converter is for.

Frequently asked questions

How do I convert CSV to JSON?

Paste the CSV into the box. The first row becomes the object keys and every following row becomes one JSON object. The output updates as you type, and you can copy it or download a .json file.

Does it handle commas inside quoted fields?

Yes. A field like "Austin, TX" stays one value. Escaped quotes ("") and line breaks inside quoted fields are handled the way RFC 4180 describes.

Can I paste data straight from Excel or Google Sheets?

Yes. Copying cells from a spreadsheet gives tab-separated text, and the converter detects tabs automatically. Semicolon-separated files from European Excel locales are detected too.

Why are my numbers strings in the JSON?

CSV has no types, so everything starts as text. Leave "Convert numbers, true/false, and null" checked to turn 42 into a number and true into a boolean. Values with leading zeros, like ZIP code 02134, stay strings so they are not corrupted.

What happens to empty cells?

With type conversion on, an empty cell becomes null. With it off, it becomes an empty string. Missing trailing cells are filled the same way so every object has the same keys.

Can I get an array of arrays instead of objects?

Yes. Switch Output to "Array of arrays" to get each row as a plain array, header row included. That shape is smaller and works well for charting libraries.

How big a file can it convert?

Several megabytes is fine on a laptop because parsing runs locally. Very large files (100 MB and up) are better handled with a command-line tool like jq, Python's csv module, or Miller.

Is my CSV kept private?

Everything runs in your browser. Nothing you enter is uploaded to a server or stored by us.

Is CSV to JSON conversion lossless?

The values are preserved, but CSV cannot express nesting, so every object is flat. If you need nested JSON, convert first and then restructure with code or a tool like jq.