How to Convert Excel to JSON (XLSX, XLS and ODS)

BySoftware Developer
Published 3 min read
An Excel spreadsheet turning into a JSON code file

To convert Excel to JSON, add your workbook to the Excel to JSON converter and download the .json file. The first row of each sheet becomes the keys, each following row becomes an object, and the converter accepts .xlsx, .xlsm, .xls and .ods files.

This guide covers the steps, shows the output for a sample sheet and lists the preparation that makes the JSON easy to use in code.

On this page
  1. How to convert an Excel file to JSON
  2. Example output
  3. Prepare your sheet for clean JSON
  4. What can you do with the JSON?
  5. Using the JSON in JavaScript
  6. Common mistakes
  7. Excel to JSON: frequently asked questions

Key takeaways

  • Each row becomes a JSON object; the header row supplies the keys.
  • Numbers stay numbers, empty cells become null, and formulas export their calculated values.
  • A one-sheet workbook becomes a JSON array; several sheets become an object keyed by sheet name.
  • The file is converted in your browser, so the spreadsheet is not uploaded.
How to Convert Excel to JSON for Free
Steps shown in the video
  1. Click Choose Excel Files and select your workbook
  2. Your file is listed with its size
  3. Click Convert to JSON
  4. Download your .json file

How to convert an Excel file to JSON

  1. 1

    Add your workbook. Open the Excel to JSON tool and drag in your file. Excel (.xlsx, .xlsm, .xls) and LibreOffice (.ods) workbooks are supported.

  2. 2

    Convert. Click Convert. The tool reads every sheet and turns its rows into objects.

  3. 3

    Download the JSON. Save the file. It is indented for readability, so you can check it before using it.

Example output

Sheet: Products
skunamepricestock
A-100Desk lamp24.912
A-101Cable7(empty)
products.json
[
  { "sku": "A-100", "name": "Desk lamp", "price": 24.9, "stock": 12 },
  { "sku": "A-101", "name": "Cable", "price": 7, "stock": null }
]

Numeric cells arrive as JSON numbers, text cells as strings, and the empty stock cell as null, so every object has the same keys.

Prepare your sheet for clean JSON

  • Put one header row at the very top of each sheet, with no title rows above it.
  • Give every column a short, unique name such as unit_price. Unnamed columns get placeholder keys.
  • Remove totals, notes and blank separator rows from the data range.
  • Format IDs with leading zeros as Text in Excel, so they export as strings.
  • Delete or rename sheets you do not want in the output.

Working with several sheets, dates or formulas? See how Excel sheets, dates and formulas become JSON.

What can you do with the JSON?

  • Load it into a JavaScript or Python app with the standard JSON parser.
  • Use it as content for a static website; our guide to using a spreadsheet as a website data source shows how.
  • Send it to an API that expects JSON records.
  • Convert it back later with JSON to Excel if the data needs editing.

Starting from a CSV export instead of a workbook? Use CSV to JSON.

Using the JSON in JavaScript

Once exported, the file can be loaded and filtered like any other JSON. A product sheet, for example, becomes a list you can search and sort in a few lines:

JavaScript
const products = await fetch("/data/products.json").then((r) => r.json());
const inStock = products.filter((p) => p.stock > 0);
const cheapestFirst = [...inStock].sort((a, b) => a.price - b.price);

If your workbook has several sheets, the file is an object keyed by sheet name, so you would read data.Products instead of data. Details are in how multiple sheets, dates and formulas become JSON.

Common mistakes

  • A title row above the headers: the title becomes a key. Delete it so the real column names are in row 1.
  • Totals at the bottom: the totals row becomes an extra object. Move totals elsewhere before exporting.
  • Merged header cells: only the first cell keeps the name. Unmerge and name each column.

Excel to JSON: frequently asked questions

How do I convert an Excel file to JSON?

Add the workbook to the Excel to JSON converter, click Convert and download the .json file. Each row becomes an object keyed by the header row.

Which file types are supported?

.xlsx, .xlsm, .xls and .ods workbooks.

Are formulas exported?

The calculated values are exported, not the formulas themselves.

What happens to empty cells?

They become null, so every object has the same keys.

Is my spreadsheet uploaded?

No. The conversion runs in your browser.

Spreadsheet data, ready for code

With a clean header row and tidy data range, converting Excel to JSON takes one click and gives you consistent, typed records for any app or API.

Keep reading