How to Convert Excel to JSON (Array of Row Objects)

Turn an Excel sheet into a JSON array your code can use: one object per row, keyed by your header row. Done in the browser, with no upload.

Updated 6 min read By CodingEagles
Free tool Excel to JSON Converter Convert a sheet to JSON row objects keyed by your headers. Open tool

You have data in a spreadsheet and you need it as JSON: to seed a database, feed an API, or drop it into a config file. This guide shows how to turn an Excel sheet into a clean array of objects, what each option does, and how to handle sheets without headers.

The short version: open the workbook, confirm your first row holds the column names, and you get back an array of objects keyed by those names. The Excel to JSON converter runs on your device, so the data never leaves your browser.

What “Excel to JSON” actually means

There is more than one way to represent a sheet as JSON, but one shape is by far the most useful: an array of objects, one per row. A sheet like this:

namequantityprice
Apples123.50
Pears82.25

becomes:

[
  { "name": "Apples", "quantity": 12, "price": 3.5 },
  { "name": "Pears", "quantity": 8, "price": 2.25 }
]

The header row supplies the keys, every other row becomes an object, and the values keep their types: numbers stay numbers, text stays text. This is the format almost every API, framework and import routine expects, which is why it is the default.

Headers are the important decision

The single choice that matters is whether your first row contains column names. Most sheets do, and treating that row as headers gives you readable keys like name and price.

If your sheet is just raw data with no header row, using the first row as keys would consume a real data row and give you nonsense keys. In that case, switch the header option off. Each value is then keyed by its column position (A, B, C), and no row is lost. You can always rename those keys later in code.

A small but useful detail: when a header cell is blank, a sensible converter falls back to the column letter for that one column rather than producing an empty "" key, which would be awkward to reference.

How to convert a sheet to JSON

Step 1: Open the workbook

Drop your .xlsx or .xls file into the converter and pick the sheet you want.

Step 2: Confirm the header row

Leave “first row is the header” on if your top row holds column names. Turn it off for raw, header-less data.

Step 3: Copy or download the JSON

The result appears formatted and ready. Copy it straight into your code, or download it as a .json file.

Handling the messy parts

Real spreadsheets are rarely tidy. A few things worth knowing:

  • Empty cells become empty strings, so every object has the same set of keys. Code that loops over the array will not hit a missing-property error.
  • Duplicate header names are a problem in any key-value format, since an object cannot have two identical keys. Rename duplicate columns in the sheet before converting so each becomes its own field.
  • Numbers that should be text. ZIP codes, phone numbers and IDs with leading zeros are worth checking. If a leading zero matters, store that column as text in Excel before converting, so it is not read as a plain number.

Common mistakes to avoid

  • Leaving the header option on for a header-less sheet. You will lose your first data row and get meaningless keys. Turn it off for raw data.
  • Expecting nested JSON. A sheet is flat, just rows and columns, so the output is flat too. If you need nested objects, convert first and reshape the array in code.
  • Forgetting duplicate headers. Two columns named the same will collapse into one key. Give every column a distinct name first.

Going the other direction, building a spreadsheet from JSON your API returned? See how to convert JSON to Excel.

Frequently asked questions

What shape of JSON does the converter produce?
An array of objects, one object per data row. Each object uses your header-row cells as keys, so a sheet with Name and Email columns becomes objects like {"Name": "...", "Email": "..."}. That is the structure most web APIs and applications expect to receive.
What if my sheet has no header row?
Switch off the header option and each value is keyed by its column letter (A, B, C and so on) instead. No row is treated as headers, so nothing is lost and the first row stays as data.
How are numbers and empty cells handled?
Numbers stay as JSON numbers and text stays as strings, so you can use the values without re-parsing them. Empty cells become empty strings, which keeps every object the same shape and avoids missing-key errors in code that reads the array.
Can it convert more than one sheet?
You convert one sheet at a time, which keeps each JSON output clean and matched to a single table. Pick the sheet you need, convert it, then switch sheets if you need another.
Does my data get uploaded?
No. The workbook is read and converted entirely on your device. Nothing is uploaded, logged or stored.

Ready to try it?

Convert a sheet to JSON row objects keyed by your headers. Free, in-browser, and 100% private — your data never leaves your device.

Open the Excel to JSON Converter