Skip to content
YouNeed Tools
Free VPN

CSV to JSON Converter

Paste CSV from Excel, Google Sheets or a database export and get a clean JSON array, typed and nested the way your code expects.

Separator

3 records, 7 columns. Delimiter: Comma (,).

Converted on your device. Your file isn’t sent anywhere.

Worked example: a semicolon export with tricky fields

This stock export from a European spreadsheet uses semicolons, has a product name containing a semicolon, another with quotes, and SKUs with leading zeros. The separator is detected as semicolon, the quoted fields are read whole, the SKUs stay text (“00412”), the price “7,50” stays text because it uses a decimal comma, and the stock.london and stock.leeds columns are nested under stock:

sku;name;price;stock.london;stock.leeds
00412;"Mug; blue";7,50;12;0
00977;"Poster ""Sea""";15;3;8
[
  {
    "sku": "00412",
    "name": "Mug; blue",
    "price": "7,50",
    "stock": {
      "london": 12,
      "leeds": 0
    }
  },
  {
    "sku": "00977",
    "name": "Poster \"Sea\"",
    "price": 15,
    "stock": {
      "london": 3,
      "leeds": 8
    }
  }
]

The CSV rules we follow

  • Fields are separated by the delimiter and records by line breaks (\r\n, \n or \r).
  • A field may be wrapped in double quotes; inside it, the delimiter and line breaks are ordinary text and "" stands for one quote.
  • A field ending in a delimiter at the end of a line gives an empty last value.
  • Files that bend the rules are read the way spreadsheets read them, and the summary line tells you what was found, such as a quote that is never closed.

Typing values safely

Converting every number-looking cell to a number seems helpful until a US zip code like 02134 loses its zero or a 16-digit card or account number is rounded, because JSON numbers in most languages are exact only up to 15 digits. The converter keeps those as text. Decimal commas (7,50) also stay text, because 7,50 could be a price or a list of two numbers; convert them in your code if you know the format.

Column names

Empty header cells become column1, column2 and so on, and a name used twice gets _2 on the second copy, so no value overwrites another. If a column is both a value and the parent of others (a and a.b), the clashing column is kept flat under its full name and listed in the summary.

Typical uses

Developers turn spreadsheets into JSON to seed a database, feed a test suite, load product data into an app or call an API with many records at once. Content teams export a sheet of FAQs, store locations or prices and need it in the JSON format a website reads. Because the converter keeps leading zeros and long numbers as text, IDs, phone numbers and postcodes survive the trip intact, and dot-path headers let a flat spreadsheet produce the nested objects an API expects. If a column should stay text even though it looks like a number, untick the typing option and convert the few real numbers in your code instead.

Related tools

Sources

Checked on November 26, 2026:

Frequently asked questions

How do I convert CSV to JSON?
Paste the CSV or open a .csv file. The first row gives the key names and every other row becomes one JSON object. Copy the JSON or download it as a .json file.
Does it handle commas and line breaks inside fields?
Yes. It follows the CSV standard (RFC 4180): a field in double quotes can contain the separator, line breaks and quotes written twice (""). A byte order mark at the start of the file is ignored.
My file uses semicolons. Does that work?
Yes. The separator is detected from the first rows: comma, semicolon, tab or pipe. You can also pick it yourself. Files from European versions of Excel often use semicolons because the comma is their decimal mark.
Are numbers turned into JSON numbers?
With “Numbers, true/false and null as JSON values” ticked, 42 and -3.5 become numbers, true and false become booleans, and empty cells become null. Codes with leading zeros such as zip codes, and digit strings longer than 15 digits, stay text so nothing is lost. Untick it to keep every value as text.
How do I get nested JSON from a CSV?
Name the columns with dots, such as address.city and address.zip. With nesting on, those become { "address": { "city": …, "zip": … } }, and numbered parts such as tags.0 and tags.1 become arrays.
Is my file uploaded?
No. It is read and converted on your device.

Last updated: 2026-11-26