CSV to JSON Converter
Convert CSV to a JSON array of objects or arrays. Auto-detect the delimiter, trim whitespace, and optionally parse numbers without mangling leading zeros. Runs in your browser.
- Free, no account
- No watermark
- No usage limit
About the CSV to JSON Converter
Most CSV to JSON converters have one habit that quietly wrecks data. They auto-detect types, so a spreadsheet column of ZIP codes like 02138 comes back as the number 2138, a leading zero gone and the value now wrong. A 19-digit account number gets rounded into scientific notation. A version string like 1.10 collapses to 1.1. You do not see it happen. You find it later, downstream, when a lookup fails and nobody can say why.
This converter starts from the opposite default. Every value stays a string, exactly the text you fed it, so nothing gets reinterpreted behind your back. When you actually want real numbers and booleans in the JSON, there is a toggle for that, and even then it refuses to change a value that would come out different. It only converts a number when the number reads back character for character identical, so 30 becomes 30 while 02138 stays "02138". That guard is the reason to reach for this one over the free tools that type everything blindly.
The rest runs in your browser. Your file is never uploaded, never logged, never sent anywhere, which matters because a CSV export is usually customer records, invoices, or analytics you should not be handing to a random website. Paste it, drop the file in, or open it from disk, and the JSON appears as you type.
How to use
- Load your CSV. Paste it straight from Excel or Google Sheets, drag a
.csvonto the box, or click Open .csv file. You can also paste a file copied from your file manager. - Set the delimiter, or leave it on Auto-detect. Auto-detect reads your first line and picks between comma, semicolon, tab, and pipe. If the guess is off, click the right one.
- Choose whether the first row is the header. On uses row one as the keys and gives you an array of objects. Off keeps every row as a plain array of values.
- Turn on Trim whitespace if your file has stray spaces after each delimiter, so
Londoncomes through asLondon. - Turn on Parse numbers when you want real numbers, true/false, and empty cells as null. Leave it off to keep every value as a string, which is the safe default.
- Pick Pretty for indented, readable JSON, or Minified for one compact line to drop into a request body.
- Copy the result, download it as a
.jsonfile, or use Share to send someone the tool with your exact settings baked into the link.
If a value opens a quote and never closes it, the output pauses and a short red message points at the problem. Fix that spot and it converts again on its own.
Getting the delimiter right
The most common complaint about any CSV tool is that everything landed in one giant column. That is almost always the delimiter. Not every file called CSV actually uses commas. Excel in a lot of European locales exports with semicolons, because there the comma is the decimal mark and 1,5 means one and a half. Copy cells out of a spreadsheet and your clipboard often hands you tab separated text instead. Logs and database dumps frequently use the pipe, |, because real data almost never contains one. When the delimiter is wrong the parser reads the whole line as a single field, you get that fat single column. Auto-detect catches most of this from your first line. When it slips, the Semicolon, Tab, and Pipe buttons force the right one.
Parsing types without corrupting them
This is the part the free converters get wrong. Auto-typing is convenient right up until it changes a value you needed left alone. So parsing is off here by default, and the toggle that turns it on is deliberately cautious.
Switch it on and three things change. A cell that reads true or false becomes a real boolean. An empty cell becomes null instead of an empty string, so you can tell a genuine gap apart from a blank. A number becomes a real number, but only when it survives a round trip, meaning the value reads back identical after the conversion. 30 reads back as 30, so it converts. 02138 would read back as 2138 with the leading zero lost, so it is kept as the string "02138". The same guard protects long account numbers that would lose precision and version strings like 1.10 that would flatten to 1.1.
If you need one specific column typed a certain way the guard is too careful about, keep parsing off and cast that column in your own code, where you set the rules for exactly the values you trust.
The quoting rules that hold a row together
CSV looks trivial until a value contains the delimiter itself. The answer is the double-quote convention written down in RFC 4180, and this parser follows it to the letter. A field wrapped in quotes can hold commas, line breaks, and quotes of its own, and it still counts as one value. So "Doe, Jane",Engineer,true is three fields, not four. This is exactly where the naive split(",") approach falls apart, it works on the demo file and then a customer named "Smith, John" shifts every column after them. To put a literal quote inside a quoted value, double it, so "She said ""hi""" gives you She said "hi". A line break inside quotes is kept too, so a multi-line mailing address survives as one cell.
Ragged rows will not throw an error. A line with more cells than the header drops the extras. A line with fewer fills the missing keys with an empty string, or with null when parsing is on, so every object carries the same full set of keys. That predictability is what keeps the JSON safe to loop over afterward.
Frequently asked questions
Why does my ZIP code keep its leading zero here?
Because values stay strings by default, and even with parsing on the round-trip guard blocks any number that would change. A ZIP like 02138 would come back as 2138 after conversion, so the tool refuses and keeps it as text. Most converters skip that check and quietly drop the zero, and you only notice when a join or a lookup later fails on the mangled value.
Can I get an array of arrays instead of objects?
Yes. Turn off First row is the header. Every row, including what would have been the header, comes through as a plain array of values in source order. That flat shape helps when column position matters more than names, or when the file has no real header to begin with.
What happens to two columns with the same header name?
The later column wins. A JSON object cannot hold two identical keys, so the second value overwrites the first for that name. If you need both, rename one in the source before converting. A blank header cell gets a positional placeholder like column1 so no key ever goes missing.
Does it handle a line break inside a cell?
Yes, as long as that cell is wrapped in double quotes. A quoted value can run across several lines and it arrives as one string with the newline preserved. A line break that sits outside quotes ends the row like any other.
Is there a row limit or a file size cap?
No fixed limit. The work happens on your own machine, so the only ceiling is your available memory on a genuinely huge file, which sits well past a normal spreadsheet export. Nothing is uploaded, so size is not tied to any account or server plan.
Why did turning on parsing change my empty cells to null?
That is intentional when Parse numbers is on. An empty cell becomes null so a real missing value reads differently from a cell that held an empty string on purpose. If you would rather every blank stay an empty string, leave parsing off and all values come through as text.
Can it produce nested JSON with objects inside objects?
Not directly. CSV is flat, one row of columns, so each row maps to a flat set of keys and cannot express a shape like an address holding its own city and zip. You get flat objects here, and you can reshape them into a nested structure in code afterward. For one-level data, which is most of it, flat is what you actually want.