Convert CSV or TSV to JSON objects or arrays, and JSON back to CSV or TSV, in your browser with no upload.
FluffyShieldProtected workspace
Language
Do
Loading the tool…
The tool didn't load. Reload the page, or check whether an extension or network filter blocks .
Free · No upload · No sign-up · No usage quotas
How do you turn a CSV file into JSON?
Paste your table and FluffyBench's CSV to JSON converter hands back one JSON object for every row, labeled by your header row. It works out the delimiter, keeps quoted commas where they belong and runs in your browser, so the table never leaves your device.
FluffyBench · 6 min read · Measured with this tool
The job at a glance
Paste your CSV or TSV into Input
→Read the status line
→Check the JSON in Result
→Copy it or download it
What it does
Stays in your browser
The table is converted on your device and never uploaded.
Finds the delimiter
Commas, semicolons, tabs and pipes are all read without a setting.
Works both ways
Turn JSON back into CSV or TSV when a spreadsheet needs it.
Limits The converter reads the shape of a table, not its meaning. It doesn't check that a column holds the numbers, dates or ids your destination expects.
What does CSV to JSON actually do?
A CSV file is a table written as plain text: one row per line, with commas between the cells. JSON describes the same information as labeled records, which is what most apps and web services expect when they ask for data. Think of it as turning a sheet of rows into a stack of index cards, where every card repeats the column names so each value says what it is.
The first row of your table becomes the labels, and every row after it becomes one card.
Need to format or validate the JSON this conversion produced?
Here's a small shop list going from paste to JSON, as it looks on a phone. On a wider screen, Input and Result sit side by side.
A CSV page opens ready to convert CSV to JSON: Language is what you have, CSV, and Do is what you want, Convert to JSON.
Paste your CSV into Input, header row first. The result updates as you type; on a phone, open Result to see the JSON.
The first row is now an object, and even the 2 is in quotation marks. The status line names the delimiter and counts what it found; Copy or Download the complete result.
The status line under the result says what the converter found. Here it reads Detected comma (,) delimiter · 4 records · 3 columns. The count includes the header row, so a header and three rows make four records.
Notice that the 2 came out as "2". A CSV file holds only text, and the converter doesn't guess which columns are numbers, so every value stays a string. If your destination wants real numbers, convert them there.
Copy puts the whole result on your clipboard, and Download saves it as config-result.json.
What the choices change
Language and Do decide the job. Convert to JSON uses the first row as labels. Convert to JSON rows doesn't, which suits a table that has no header.
Choose Convert to JSON rows under Do, and the same shop list comes out as lists instead of labeled records.
Shop list, JSON rows
The header row is just the first list. Nothing is used as a label. How we measured
You never choose a delimiter. The converter tries comma, semicolon, tab and pipe and keeps the one that splits most of the first 100 records into the same number of fields. That's why a semicolon-separated export with decimal commas still reads as one value.
Indentation only changes spacing, 2 spaces or 4. Either way the JSON is bigger than the CSV it came from, about 2.6 times as large for the shop list, because every row repeats the column names.
For the other direction, set Language to JSON and Do to Convert to CSV. Here are three JSON objects, one of them with a key the others don't have.
JSON objects as CSV
Every key becomes a column once. A key an object doesn't have leaves its cell empty.
JSON to CSV takes a list of objects or a list of lists. A value has to be text, a number, true or false, or empty. A list or an object inside a value stops the conversion with the path of that value. Convert to TSV rewrites a table with tabs and quotes only the cells that still need it, so a comma no longer gets quotation marks.
What to check before you use the result
Start with the status line. The column count comes from your header row, so if it isn't what you expected, look there first. Then find a row you know has a comma in it and check that it's still one value. A comma in a cell without quotation marks splits it in two.
For a longer table, Validate checks that every quote closes and every row has as many fields as the header, which is what RFC 4180 asks of a CSV file. A clean table reads Valid CSV · Detected comma (,) delimiter · 4 records · 3 columns. That means it's well shaped, not that the numbers are right or that a date is a date.
When the result isn't what you expected
A row has too few or too many fields. Converting still works. A short row leaves its missing keys out, while an empty cell keeps its key with an empty value. Fields beyond the header are left out of the objects. To find the row, set Do to Validate. It stops at the first one, with a message like Row 2 has 2 fields, expected 3. Detected delimiter: comma (,).
Here Validate has stopped at a short row, and the message says exactly where.
Short row flagged
Click the problem to jump to that line in Input.
It says Unclosed quote. A quotation mark that opens and never closes would swallow everything after it, so the converter refuses and points at the opening quote. The message reads Unclosed quote. Add the closing quote before the end of the record.
A key starts with a space. After a comma, a space counts as part of the next value. A header written as item, quantity gives the key " quantity", with the space in it. Remove the space from the source.
Two columns have the same name. The second gets _2 and the third _3, so every key in an object stays unique.
JSON to CSV refuses your JSON. A single object isn't a list of rows, so you'll see JSON to CSV needs an array of objects or an array of arrays; this is an object. Wrap the object in square brackets. A list or object inside a value is spread over columns named by its path: a tea with two tags gives the header item,tags.0,tags.1.
Where to go from here
Try a few rows first and read the status line before you paste the whole table. Example loads a small table into an empty Input if you want something to practice on. Keep your original CSV, since the JSON repeats every column name and the conversion keeps all values as text. When the result is going into code, check that it parses before you rely on it.