Use an Excel Spreadsheet as a JSON Data Source for Your Website

BySoftware Developer
Published 4 min read
A laptop, tablet and phone displaying website data generated from a spreadsheet as JSON

A spreadsheet makes a simple content source for a website: colleagues edit rows in Excel, you convert the file with Excel to JSON, and your site reads the JSON. It works well for product lists, team directories, FAQs, event schedules and price tables that change a few times a month.

This guide sets out the workflow, a sheet layout that converts cleanly and the code to display the data.

On this page
  1. When does a spreadsheet make sense as a data source?
  2. Design the sheet for clean JSON
  3. The workflow, step by step
  4. Display the data on your site
  5. Common pitfalls
  6. Keep editors from breaking the data
  7. Spreadsheet as a data source: FAQ

Key takeaways

  • Spreadsheets are a familiar editing tool for people who would never touch a CMS or code.
  • Design the sheet like a database table: one header row, one record per row, no merged cells.
  • Convert to JSON when the content changes and commit the file with your site.
  • For content that changes hourly or needs permissions, use a real CMS or database instead.
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

When does a spreadsheet make sense as a data source?

A spreadsheet fits content that is structured, edited by a small team and updated occasionally. It is a poor fit for content edited by many people at once, data that needs user permissions, or anything that changes every few minutes.

Good and poor fits
Good fitPoor fit
Product or menu listsLive stock levels
Team and staff directoriesUser accounts
FAQs and glossariesComment threads
Event schedulesBooking systems
Price tablesOrders and payments

Design the sheet for clean JSON

  • Row 1 holds the field names, in code-friendly form: title, slug, price, image_url.
  • Each row is one item. Never use blank rows as separators.
  • No merged cells, colours-as-data or comments that carry meaning.
  • IDs and slugs are formatted as Text so they export as strings.
  • One sheet per content type, for example Products and Categories.

Each sheet becomes its own key in the JSON when the workbook has several. The details are in how multiple sheets, dates and formulas export.

The workflow, step by step

  1. 1

    Editors update the workbook in Excel or a shared drive.

  2. 2

    Convert it with the Excel to JSON tool and download the .json file.

  3. 3

    Replace the data file in your site, for example data/products.json, and review the change.

  4. 4

    Publish. Your site reads the new file on the next build or page load.

Display the data on your site

JavaScript: render a product list
const products = await fetch("/data/products.json").then((r) => r.json());

document.querySelector("#products").innerHTML = products
  .map((p) => `<li>${p.title}: ${p.price.toFixed(2)} EUR</li>`)
  .join("");

Static site generators such as Astro, Eleventy, Hugo and Next.js can import JSON files at build time, so the data ends up in plain HTML that search engines can read.

Common pitfalls

  • A renamed column breaks the site. Agree that header names are fixed, or check for missing fields in code.
  • Formatted numbers. Prices typed as "€24.90" export as text; keep the currency in its own column.
  • Dates. Store them as text in yyyy-mm-dd format to avoid time zone shifts.
  • Unescaped HTML. Escape spreadsheet text before inserting it into a page, since editors can type anything into a cell.

Keep editors from breaking the data

A little structure in the workbook prevents most problems before they reach your site. Use Excel's Data Validation to limit a column to a list of categories or to numbers only, lock the header row so nobody renames a field, and add a short Instructions sheet that explains each column. If you use the Instructions sheet, remove it, or ignore its key in code, because every sheet appears in the JSON output.

Spreadsheet as a data source: FAQ

Can I use Excel as a database for a website?

For small, occasionally updated content, yes: convert the sheet to JSON and have the site read it. For frequent updates or many editors, use a real database or CMS.

How do I convert the spreadsheet to JSON?

Use an Excel to JSON converter. Each row becomes an object and the header row provides the keys.

Does each sheet become a separate file?

No. A workbook with several sheets becomes one JSON object with a key per sheet.

Is it SEO friendly?

Yes, if your site renders the data into HTML at build time or on the server, so the content is in the page source.

Can Google Sheets work too?

Yes. Download the sheet as .xlsx or .ods and convert it the same way.

A CMS your team already knows

For structured content that changes now and then, a spreadsheet plus a JSON conversion is hard to beat: editors stay in Excel, and your site gets clean, typed data.

Keep reading