Shiklo Tools
PDF40
Image20
Calculators & Converters25
Text & Writing13
Developer26
Video14
Audio14
Document14
Data & Spreadsheet12
Web & SEO9
OCR & Scanning5
Archive & File12
Security & Privacy23
Health & Medical29
QR & Barcode5

CSV to JSON

Convert CSV or TSV to JSON: array of objects, array of arrays or keyed by a column, with number detection and nested objects from dot.path headers.

Turn a spreadsheet export into JSON for an API, a web app, a config file or a database import. Paste CSV or open a .csv file: the separator is detected automatically, the first row becomes the keys, and numbers, true/false and null are converted to real JSON values — while things that only look like numbers, such as ZIP codes with leading zeros or very long IDs, stay as text.

Headers written as dot paths, such as address.city, become nested objects. Choose an array of objects, an array of arrays, or an object keyed by the first column. Everything runs in your browser; your data is never uploaded.

How to use CSV to JSON

  1. Paste CSV text, open a .csv / .tsv file, or click Sample.
  2. Check the detected separator (or choose one) and whether the first row is a header.
  3. Pick the output shape and how empty cells should appear.
  4. Copy the JSON or download it as a .json file.

Features

  • Automatic separator detection: comma, semicolon, tab or pipe.
  • Correct handling of quoted values, commas and line breaks inside cells (RFC 4180).
  • Numbers, true / false and null become real JSON values — safely: 007 and long IDs stay text.
  • Dot-path headers (address.city) become nested objects; numeric parts (tags.0) become arrays.
  • Output as an array of objects, an array of arrays, or an object keyed by the first column.
  • Empty cells as "", null or left out.
  • Duplicate or missing header names are made unique.
  • Private: runs entirely in your browser.

Output shapes

Different programs expect different JSON. For the CSV id,name / 1,Ann / 2,Bob the three shapes look like this.

ShapeResultUse for
Array of objects[{"id":1,"name":"Ann"},{"id":2,"name":"Bob"}]APIs, most apps (default)
Array of arrays[["id","name"],[1,"Ann"],[2,"Bob"]]Charts, spreadsheet libraries
Keyed by first column{"1":{"name":"Ann"},"2":{"name":"Bob"}}Lookups by ID, translations

How values are typed

With “Detect numbers & true/false” on, 42 and 3.5 become numbers, true and false become booleans and the word null becomes null. Values that would change if turned into a number are kept as text: postal codes and phone numbers with a leading zero (007, 0471), and whole numbers longer than JavaScript can store exactly (above 9,007,199,254,740,991). Dates stay as text, because JSON has no date type. Switch detection off to keep every value as a string.

Building nested JSON from columns

Name your columns with dots to create structure: a header row of id, address.city, address.zip produces {"id": 1, "address": {"city": "Pune", "zip": "411001"}}. Numeric parts create arrays, so tags.0 and tags.1 become "tags": ["a", "b"]. Files made with JSON to CSV use exactly this naming, so you can convert back and forth.

From Excel or Google Sheets

Save the sheet as CSV (File › Save As › CSV UTF-8 in Excel, or File › Download › CSV in Google Sheets) and open it here, or simply copy the cells and paste them — copied cells are tab-separated, which the converter detects automatically.

Separators, quotes and encoding

Not every CSV uses commas. Files saved by Excel in much of Europe use semicolons, exports from databases often use tabs, and some systems use the pipe character. With Separator set to Auto the converter looks at the first lines and picks the right one; you can also choose comma, semicolon, tab or pipe yourself. Fields wrapped in double quotes may contain the separator, line breaks and doubled quotes, as the CSV standard allows. The invisible byte-order mark that Excel adds at the start of UTF-8 files is removed, so the first column name is never polluted with a hidden character.

Frequently asked questions

Is the CSV to JSON converter free and private?

Yes. It is free, and your CSV is converted in your browser — it is never uploaded.

Can I paste directly from Excel?

Yes. Copy the cells and paste them in; Excel copies as tab-separated text, which is detected automatically.

Why is my ZIP code still a string?

Because 01234 would become 1234 as a number. Values with leading zeros, and very long numbers, are kept as text on purpose so nothing is lost.

My file has no header row — what happens?

Untick “First row is the header”. The columns are then named column1, column2 and so on.

How do I get nested objects?

Use dot paths in the header row, such as address.city, and keep “Nest dot.path headers” on.

What if two columns have the same name?

They are renamed to keep both, e.g. name and name_2, so no data is overwritten.

Can it handle quoted fields with commas and line breaks?

Yes. Quoted fields are parsed according to the CSV standard, including doubled quotes inside values.

Related tools