Skip to content
Tools

CSV to JSON Converter

Turn spreadsheet exports into clean, typed JSON. Delimiters are detected for you, headers become keys, and nothing ever leaves your browser.

Visible pane
0 chars

Paste CSV on the left, upload a file, or drop one onto the page.

Waiting for CSV

Delimiter: comma (detected)

Everything happens locally in your browser. Your CSV is never uploaded.

What is CSV to JSON conversion?

CSV is a table: one line per record, values separated by a delimiter, and usually a first row naming the columns. JSON is a structure: named keys, real types, and nesting to any depth. Converting between them means deciding what each column is called, what type each value should be, and whether any of it should nest.

Four lines of CSV become an array of records
client,project,budget,activeNorthwind Trading,Storefront rebuild,48000,true [  {    "client": "Northwind Trading",    "project": "Storefront rebuild",    "budget": 48000,    "active": true  }]

Note what happened to 48000 and true: they became a number and a boolean rather than strings. That is the part worth being careful about, and this converter is deliberately cautious about it — see below.

Everything runs in your browser. The files people convert are customer exports, order histories and internal reports, so nothing here is uploaded, stored or logged.

How to convert a CSV file

  1. 1. Add the CSV. Paste it into the left panel, use the upload button, or drag a .csv file anywhere onto the tool. The file name appears above the panel and is reused when you download the result.
  2. 2. Check the delimiter. It is detected automatically and shown in the status bar. If the file uses something unusual, pick it — or type any single character — in the options.
  3. 3. Confirm the header row. The first row is treated as column names by default. Turn that off for a file that starts straight into data, and each record becomes an array instead.
  4. 4. Choose how values are built. Decide whether types are detected, whether headers with dots and brackets should nest, and what an empty cell becomes.
  5. 5. Read the warnings. If any row has the wrong number of columns, or a header is duplicated, the status bar says so and the Statistics tab names the line.
  6. 6. Take the JSON. Copy it, or download it as a .json file named after the one you opened.

Delimiters and quoted fields

“Comma-separated” is optimistic. Exports from software configured for most of Europe use semicolons, because the comma is the decimal separator there. Database dumps often use tabs. Log pipelines use pipes. All four are built in, and any other single character can be typed in.

Detection works by consistency, not frequency. Each candidate is tried against the first twenty lines, and the one that produces the same number of columns on every line wins. Counting occurrences instead would pick the comma for the file below, which has far more commas than semicolons — and get every field wrong.

Semicolon-separated, despite being full of commas
title;note"Hello, world, again";"one, two, three""a, b, c";"d, e, f"

Quoted fields follow RFC 4180. A field wrapped in double quotes may contain the delimiter, line breaks, or a doubled quote "" meaning one literal quote character. The surrounding quotes are not part of the value.

All three cases in one file
id,company,note1,"Northwind Trading, Ltd","Ran overnight, no downtime"2,"Lumen Health","Asked for a ""dark mode"" option"

Line endings are equally varied and equally handled: \r\n from Windows, \n from everywhere else, and a bare \r from very old Mac exports all end a row.

Building nested JSON

A CSV is flat, but the JSON you want usually is not. Turn on nested JSON and the column names themselves describe the shape: a dot opens an object, and a bracketed number opens an array.

Dotted and bracketed headers become structure
id,customer.name,customer.email,tags[0],tags[1]1001,Mei Tanaka,mei@example.com,priority,renewal [  {    "id": 1001,    "customer": { "name": "Mei Tanaka", "email": "mei@example.com" },    "tags": ["priority", "renewal"]  }]

The two can be combined to any depth — address.lines[0], a.b.c.d — and the containers are created as needed. If two headers ask for the same path in incompatible ways, such as a and a.b in one file, the first column to claim it keeps it and the other is skipped. Overwriting would mean silently discarding one of the two columns.

Once the shape gets deep enough to be hard to read in one block, paste the output into the JSON viewer and walk the tree, or the JSON formatter to re-indent it.

How types are detected

A CSV has no types. Everything in the file is text, and deciding that 42 is a number is a guess — usually a helpful one, occasionally a destructive one. The rule here is deliberately narrow:

A value becomes a number only if converting it back produces exactly the original text. 42 passes. 007 does not, because it would come back as 7 and the leading zero is gone for good. That single rule covers the cases that cause real damage:

  • Product and zip codes. 007 and 01234 stay strings.
  • Phone numbers. +44 20 7946 0958 is not a quantity and keeps its formatting.
  • Identifiers longer than 15 digits. Beyond that, JSON numbers lose precision, so the string is the honest answer.
  • Versions and dates. 1.2.3 and 2026-08-03 are text.
  • Currency. $9.99 keeps its symbol.

true, false and null are recognised regardless of case. If you would rather have none of this, turn type detection off and every value stays exactly the string it was in the file.

When you need CSV to JSON

Seeding an API or a database

A spreadsheet of products or users becomes an array of records you can POST straight to an endpoint or feed to a migration script.

Building test fixtures

Test data is far easier to edit as a spreadsheet than as JSON. Keep the CSV as the source and convert it whenever the fixture needs updating.

Moving data out of a spreadsheet

Nearly every tool exports CSV and nearly every API speaks JSON. This is the step between the two, without a script and without uploading a customer list to a stranger's server.

Configuring a front end

Translations, feature flags and pricing tables are usually maintained in a sheet by people who do not write JSON. Convert on the way in.

Inspecting an export

A wide CSV is hard to read. As JSON, each record is one labelled object, so a wrong column or a blank field is obvious at a glance.

Preparing data for a language model

Records with named keys give a model far more to work with than positional columns, and the nested option groups related fields together.

Best practices

  • Check the delimiter before you trust the output. The status bar names the one in use. If a record came out as a single long field, the delimiter is wrong — not the file.
  • Turn off type detection for identifiers. If a column holds account numbers, SKUs or anything with a leading zero that the narrow rule does not already protect, keeping everything as strings is safer than checking afterwards.
  • Read the warnings rather than skimming past them. A ragged row almost always means a stray delimiter inside an unquoted field, and that shifts every value after it into the wrong column.
  • Give every column a distinct name. Two columns called id produce id and id_2, which works but is not what anyone downstream expects.
  • Decide what an empty cell means before converting. An empty string, a null and an absent key behave differently in most systems, and it is much cheaper to choose now than to patch the JSON later.
  • Keep the CSV as the source of truth. For data that people edit by hand — translations, pricing, fixtures — edit the spreadsheet and convert again. Editing generated JSON by hand is how the two drift apart, and going back the other way with the JSON to CSV converter flattens nesting that a spreadsheet cannot represent.

Frequently asked questions

Is this CSV to JSON converter free?

Yes. Conversion, file upload, download, nested output and every option are free, with no account, no sign-up and no limit on how many files you convert.

Is my CSV file uploaded anywhere?

No. The file is read and converted by JavaScript running in your browser. Nothing is sent to a server, nothing is stored and nothing is logged. You can disconnect from the network after the page loads and it keeps working — which matters, because the files people convert are usually customer lists, exports and internal reports.

How do I convert a CSV file to JSON?

Paste the CSV into the left panel, click the upload button, or drag a .csv file anywhere onto the tool. The JSON appears on the right as you type. Copy it with the copy button or save it with the download button, which names the file after the one you opened.

Which delimiters are supported?

Comma, semicolon, tab and pipe are built in, and you can type any other single character. By default the delimiter is detected from the file itself: each candidate is tried and the one that produces the same number of columns on every line wins. That is more reliable than counting occurrences, because a file full of commas inside quoted text would otherwise beat a real semicolon.

What happens to quoted fields?

They are handled the way RFC 4180 specifies. A quoted field can contain the delimiter, line breaks, or doubled quotes to mean a literal quote character — all three are read correctly and the quotes themselves are not part of the value.

Does the first row have to be a header?

No, but it is by default. With a header row, each record is an object whose keys are the column names. Turn the option off and each record becomes an array of values instead, which is what a spreadsheet without column names actually means.

What happens if two columns have the same name?

The second one is renamed — id and id_2 — and a warning says so. One JSON key cannot hold two values, so the alternative would be silently losing a column. Columns with no name at all become column1, column2 and so on.

Can it produce nested JSON?

Yes. Turn on nested JSON and a header like user.name becomes { "user": { "name": … } }, while tags[0] and tags[1] build an array. Dots and brackets can be combined to any depth, so address.lines[0] works. If two headers want the same path — a and a.b — the first one wins and the other is skipped rather than overwriting it.

Does it detect numbers and booleans?

Yes, and deliberately conservatively. 42 becomes a number, true becomes a boolean, and null becomes null. But 007 stays a string, and so do phone numbers, version numbers, dates, currency amounts, hex, exponent notation and any integer too large to survive as a JSON number. The rule is that a value only becomes a number if converting it back gives exactly the original text — otherwise the conversion would quietly destroy data such as a leading zero.

What happens to empty values?

You choose: an empty string, null, or omitted from the record entirely. Empty strings are the default because they are the most faithful to what the file says. Omitting is useful when a downstream system treats a missing key differently from a null one.

What if a row has the wrong number of columns?

It is kept and a warning names the line. Missing fields become empty values, and any extra fields beyond the header are kept under numbered keys such as column5. Discarding the row would be worse: the data is usually still wanted, and a silent drop is very hard to notice.

Does it handle accented and non-Latin characters?

Yes. Files are read as UTF-8, so German umlauts, Japanese, Arabic, Polish diacritics and emoji all survive intact. A byte-order mark at the start of the file — which Excel adds and which would otherwise become part of the first column name — is removed automatically. The statistics panel shows the size in UTF-8 bytes as well as in characters, because the two differ as soon as anything is outside ASCII.

How large a file can it convert?

Up to about 20 MB of text. Conversion is debounced so typing stays responsive, and the parser makes a single pass over the file with no recursion, so a large document cannot overflow anything. Very large files are better handled by a script than by any browser tool.

Can I search inside the CSV?

Yes. The search button in the toolbar, or Ctrl/Cmd+F, opens a search over the CSV panel with every match highlighted and previous and next buttons to step through them. Escape closes it.

Are there keyboard shortcuts?

Ctrl/Cmd+F opens the search, Ctrl/Cmd+Shift+C copies the JSON, Ctrl/Cmd+Shift+D downloads it, Ctrl/Cmd+Shift+L loads another sample and Ctrl/Cmd+Shift+Delete clears the input. Escape closes the search.

Does it work offline?

Once the page has loaded, yes. Everything runs locally, so you can disconnect and keep converting. A connection is only needed to load the page the first time.

Popular tools

↑ ↓NavigateOpenEscClose