How to Convert CSV to JSON (Free, In Your Browser)

Updated September 10, 2026

Just need the tool?CSV to JSON โ†’

Almost everyone's first instinct for turning CSV into JSON is a single line of code: split each row on the commas, line the pieces up against the header, done. It holds together right up until a customer named Smith, John lands in the file and quietly shoves every column one seat to the right. CSV looks like the simplest format in the world, and that appearance is exactly why so many hand-rolled converters break the moment they meet real data.

The mapping underneath it really is that simple. What follows is the mapping, plus the handful of details that decide whether your output comes out clean or scrambled.

Rows in, objects out

A CSV file is nothing but text. The first line usually labels the columns, and every line below it is one record whose fields are separated by a delimiter โ€” a comma, most of the time. JSON stores those same records as an array of objects, each field a named key paired with its value. So this CSV:

name,age,city
Jane,29,Boston

comes out as this JSON:

[
  {
    "name": "Jane",
    "age": "29",
    "city": "Boston"
  }
]

The header supplies the keys, each row becomes one object, and there is nothing more to the transformation itself. Everything hard about CSV conversion lives in the edge cases around that core.

Doing it with the CSV to JSON tool

For a one-off, a browser tool beats writing anything at all. The CSV to JSON tool on this site performs exactly the row-to-object mapping above, with only an option or two to set. The parsing all happens in the page itself โ€” your pasted text is worked on by your own machine and goes to no server โ€” so you can drop in an internal export without it leaving your laptop, there is nothing to register for, and no cap on how much you paste.

Step by step

  1. Open the CSV to JSON tool.
  2. Paste your CSV into the input box โ€” a selection copied straight from a spreadsheet works, and so does the contents of a saved .csv file.
  3. Set the delimiter to match your data: comma, semicolon, or tab. European exports often use semicolons; tabs mean you are dealing with a TSV.
  4. Keep "First row is header" ticked when your opening line names the columns; clear it when the data begins on line one.
  5. Watch the JSON build in the output panel. It re-renders as you type or flip an option, and a running count of converted data rows lets you check the total against what you expected.
  6. Hit Copy to send the JSON to your clipboard, then paste it onward.

With the header option on, every row turns into an object keyed by the header names. Turn it off and the output becomes an array of arrays โ€” one inner array per row โ€” which is what you want when the columns have no names worth keeping.

Where naive converters fall apart: quoting

Circle back to Smith, John. This is the failure the opening warned about, and it is the single biggest reason a conversion comes out garbled: a field that itself contains the delimiter. Split that comma-delimited row blindly and one value becomes two, dragging every column after it out of alignment. The CSV convention for handling this is to wrap the offending field in double quotes โ€” "Smith, John" โ€” and the tool honours that convention. It reads quoted fields correctly, including ones that span line breaks, and it understands an escaped quote written as a doubled double-quote ("") inside a quoted field, collapsing it back to a single literal ".

So when your JSON arrives with columns out of step, or one value that has apparently swallowed the rest of the file, look at the quoting first: either a field that needed quotes never got them, or a quote was opened in the source and never closed. That is a problem to repair in the CSV, not in the JSON.

The one thing to plan around: every value is a string

Here is the limitation to keep in front of you. Each value comes through as a string. The 29 from earlier lands as "29"; true, false, and empty cells all arrive as text too. The converter makes no attempt to guess types. For plenty of uses that is perfectly fine, but if whatever reads your JSON expects genuine numbers or booleans, you will cast them yourself afterward โ€” in your code, or with a second transform pass. Nesting is off the table as well: a flat CSV yields flat objects, and there is no way to assemble objects-inside-objects out of columns alone.

A few smaller behaviours are worth having in your head:

Reaching for code instead

A browser tab is the right container for a one-time job and the wrong one for a habit. If you are converting the same export every morning, a dozen lines of Python (its built-in csv and json modules) or a short Node script will do it on repeat and let you cast types, rename fields, and build nested structures all in one pass. If the file runs to hundreds of megabytes, do not ask a browser tab to hold it โ€” a command-line utility or a streaming parser is built for that weight. And when the CSV is genuinely broken, with ragged rows or quoting that contradicts itself, straighten it out in a spreadsheet first, because no converter can reliably reconstruct what a malformed file was trying to say.

So the split-on-commas instinct is not wrong so much as incomplete. For a clean one-off export, paste it in and copy the result โ€” you will be finished before you would have finished writing the parser. Save the code for the day the job repeats, the file turns enormous, or the data needs real types, and let the downstream side handle shape and casting where you actually have the control to do it right.

Do it now โ€” free and private

The tool runs entirely in your browser: nothing you add is uploaded, and there is no sign-up.

CSV to JSON โ†’

Related tools

JSON to CSVJSON Formatter