Skip to the content

Contact usFree tools · No signup · Files stay on your device

Developer Tools

Excel to JSON: the complete guide to converting spreadsheets for apps and APIs

Excel to JSON: the complete guide to converting spreadsheets for apps and APIs

Apps and APIs speak JSON, but data is usually collected in Excel: a price list, a list of schools, a set of translations. Our free Excel to JSON converter turns an .xlsx or .csv file into JSON in your browser. The first row becomes the keys, each following row becomes one object, and you choose how numbers, dates, empty cells and nested fields are written.

This guide explains every option on the page, the exact rules for numbers and dates, and the problems you are most likely to meet. If you need to go the other way, read the JSON to Excel guide.

What Excel to JSON does

It reads one sheet of a workbook, or all of them, and writes JSON text. With the default settings, a sheet like this:

Name Phone Amount
Rahim Uddin 01712345678 1500.5
Nusrat Jahan 01812345678 720

becomes an array of objects:

[
  { "Name": "Rahim Uddin", "Phone": "01712345678", "Amount": 1500.5 },
  { "Name": "Nusrat Jahan", "Phone": "01812345678", "Amount": 720 }
]

(The tool prints each key on its own line; it is shown compactly here.)

It does not connect to a database, validate the data against a schema, or convert part of a sheet by range. It also does not read old binary .xls files.

How to use Excel to JSON, step by step

  1. Open Excel to JSON.
  2. Press "Choose an Excel or CSV file" or drop a file on the box.
  3. If the workbook has more than one sheet, pick one in Sheet, or choose "All sheets".
  4. Set the options in the JSON options panel.
  5. Read the result in the JSON panel. The numbers above it show Sheets, Rows, Columns and JSON size.
  6. Press Copy, or "Download .json". The download keeps your file name with a .json ending.

Everything updates as you change an option, so you can try settings and watch the output.

Every option explained

Sheet

This list appears only when the workbook has more than one sheet. Hidden sheets are marked "(hidden)", and the page opens on the first visible sheet, the one Excel would show.

"All sheets" changes the shape of the result. Instead of one array you get an object with one array per sheet name:

{ "Dhaka": [ ... ], "Sylhet": [ ... ] }

Values: Typed or Exactly as shown

  • Typed (numbers, booleans, dates): numbers become JSON numbers, TRUE and FALSE become true and false, and dates become ISO text such as 2026-03-01, or 2026-03-01T18:00:00 when the cell has a time. JSON has no date type, so ISO text is the usual choice.
  • Exactly as shown (text): every value is a string, copied from what Excel displays. A cell formatted as 1,500.50 gives "1,500.50", and a date formatted as 1-Mar-26 gives "1-Mar-26".

For code, Typed is almost always right. Use "Exactly as shown" for display text, or when a custom number format adds zeros that you want to keep.

Empty cells

Choose what an empty cell becomes: null, empty text ("") or "Leave the key out". Leaving the key out makes smaller objects, but the keys of each record can then differ. This option has no effect on lists of lists, where there are no keys: "leave out" gives null there.

Indent

2 spaces, 4 spaces, Tabs or Minified. Minified writes the whole result on one line, which is best for an API request body.

First row is the header

Ticked by default: row 1 gives the keys and every later row is an object. Untick it and you get an array of arrays, one inner array per row, including the first. Rows are padded to the width of the widest row.

Header names are cleaned up: spaces at the ends are trimmed, an empty header becomes column_3 (the column number), and a repeated name gets _2, _3 and so on, so no key is lost.

Skip empty rows

Ticked by default. Rows in which every cell is empty are left out. Untick it to keep them, which gives objects full of nulls.

Nest dotted headers

Visible when the header row is on. A header such as address.city becomes a nested object:

{ "id": 1, "address": { "city": "Dhaka", "zip": 1205 } }

If two headers clash, for example a and a.b, those keys stay flat and a warning appears above the output.

Read cells holding JSON as JSON

Visible in Typed mode. A text cell that starts with [ or { is parsed as JSON, so a cell holding ["a","b"] becomes a real array. If it cannot be parsed, the text is kept as it is.

What it accepts and its limits

  • File types: .xlsx, .xlsm, .xltx and .xltm workbooks, plus .csv, .tsv and .txt text tables.
  • Old .xls files: refused with "This is an old Excel 97–2003 (.xls) file. Open it in Excel, Google Sheets or LibreOffice and save it as .xlsx, then try again."
  • Size: up to 100 MB per file.
  • Passwords: a protected workbook cannot be opened. Remove the password in Excel first.
  • Formulas: you get the last value Excel calculated and saved. A file written by a program that never calculated has no saved values, and those cells come out empty.
  • Merged cells: the value sits in the top-left cell only, as Excel stores it. The other cells in the range are empty.
  • Error cells: a cell showing #N/A is written as the text "#N/A".
  • Large output: the page shows the first 200,000 characters. Copy and Download always have the full result.

Privacy

Excel to JSON runs in your browser. The file is read and converted on your device and is never sent to a server, so a salary sheet or a student list stays with you.

The number and date rules in detail

These are the rules that surprise people most.

Numbers. A numeric cell becomes a JSON number. The one exception is a whole number beyond JavaScript's safe range (9,007,199,254,740,991). That is written as a string so no digit changes. Excel itself only stores 15 digits, so this is rare.

Leading zeros. A phone number stored in the workbook as text keeps its zero. If Excel has already stored it as a number, such as 1712345678, Typed gives you 1712345678. When the zero is only displayed by a custom format, "Exactly as shown" gives back "01712345678". The background is in how to stop Excel removing the 0 from BD phone numbers.

Dates. Excel stores a date as a number with a date format. Typed mode recognises the format and writes ISO text, so you will not see numbers like 46082.

CSV input. In a CSV, plain numbers and the words true and false (in lower case, upper case or capitalised) are typed. Everything else is text, including values with a leading zero and whole numbers too long to be exact.

A worked example

Take a sheet named Orders with these columns: Order, Customer, Phone, Amount, Paid, Note. Row 2 has BD-1001, Rahim Uddin, a text phone number, 1500.5 formatted as #,##0.00, TRUE and an empty Note.

With the defaults the first record is:

{
  "Order": "BD-1001",
  "Customer": "Rahim Uddin",
  "Phone": "01712345678",
  "Amount": 1500.5,
  "Paid": true,
  "Note": null
}

Change Values to "Exactly as shown" and the same record becomes:

{
  "Order": "BD-1001",
  "Customer": "Rahim Uddin",
  "Phone": "01712345678",
  "Amount": "1,500.50",
  "Paid": "TRUE",
  "Note": null
}

Set Empty cells to "Leave the key out" and the Note line disappears from records where it is empty.

Tips to work faster

  • Put your header row first and make the names short and consistent. They become your JSON keys, so unit_price is easier to use in code than Unit Price (BDT).
  • Use dotted headers and "Nest dotted headers" to build nested data without writing code.
  • Paste the output into the JSON Formatter when you want a tree view or sorted keys, and into the JSON Validator before you send it anywhere.
  • If your data is already a CSV, CSV to JSON has options for that format.

Common problems and how to fix them

"There are no data rows below the header row in this sheet."

The sheet holds only one row, or the rest is empty. Check that you chose the right sheet in Sheet.

Some keys are called column_2

The header cell above that column is empty. Add a name in Excel and convert again.

A column is null everywhere

The cells may contain formulas that were never calculated, which happens with files made by a program rather than saved by Excel. Open the file in Excel, save it again so the values are stored, and convert the new copy.

Numbers have turned into text

You are in "Exactly as shown" mode. Switch Values to Typed. In a CSV, a value with a currency sign or a space inside, such as ৳1,500, is not a plain number and stays text.

The file will not open

Check which message appears. "This workbook is password-protected" means exactly that. "This file isn't an Excel workbook (.xlsx)" appears when the file is not a spreadsheet, and a file with an old .xls ending needs saving as .xlsx first.

Quick checklist

  • Choose the right sheet, or "All sheets" for one array per sheet.
  • Keep Typed values for code and "Exactly as shown" for display text.
  • Write short header names; use dots for nested objects.
  • Decide what an empty cell should be before you share the JSON.
  • Validate the output before sending it to an API.

Frequently asked questions

Should I choose Typed or Exactly as shown?
Choose Typed when the JSON goes to code that does maths or sorting: numbers stay numbers and dates become ISO text. Choose Exactly as shown when you want the text Excel displays, such as 1,234.50 or a phone number padded with zeros by a custom format.
What is the difference between null, empty text and leaving the key out?
An empty cell becomes null, an empty string (""), or no key at all, depending on your choice. Leaving the key out gives the smallest objects, but every record may then have different keys. In a list of lists there are no keys, so that choice gives null.
How do I get nested JSON from a flat sheet?
Name the header cells with dots, such as address.city and address.zip, and tick “Nest dotted headers”. Each record then holds an address object with city and zip inside it.
Why is my CSV file accepted here too?
The page opens spreadsheets and text tables the same way. A .csv, .tsv or .txt file is treated as a one-sheet workbook, with numbers and TRUE/FALSE typed and everything else as text.
Can I convert only part of a sheet?
Not by range. The whole chosen sheet is converted. Remove unwanted rows or columns in Excel first, or tick “Skip empty rows” to drop blank ones.
Found this useful? Share it

Tools in this guide

Main tool

Excel to JSON

Turn a spreadsheet into JSON you can use in code: an array of objects keyed by your header row, or plain arrays.

Open tool

JSON to Excel

Paste or open JSON and download a real Excel workbook: keys become the header row, nested objects become columns like address.city, and numbers.

Open tool

JSON Formatter

Paste messy or minified JSON to get clean, indented output instantly — or minify it for production.

Open tool

CSV to JSON

Paste CSV or open a file to get clean JSON — an array of objects or arrays — with proper handling of quotes, line breaks, delimiters and data types.

Open tool

Back to all guides & blog