All tools
Free · Private · No upload

Convert Excel to HTML Table Online

Turn an Excel sheet into HTML table markup you can paste into a web page or a CMS. The workbook is opened in your browser and never uploaded.

Drop a CSV or Excel file here

CSV · XLSX · XLS · XLSM · XLSB

or paste your data below

How to convert Excel to an HTML table

Three steps from league.xlsx to an HTML table.

1. Drop the workbook

Drop an .xlsx, .xls, .xlsm or .xlsb file, or paste cells copied from Excel.

2. Check it in the grid

Delete merged title rows and decorative blank rows. In HTML they would become rows of empty cells.

3. Set the markup options

Keep or drop thead/tbody, escaping and minifying, add a class name, then copy the markup or download data.html.

Example: Excel in, HTML out

A league table where Points is calculated with =C2*3, and one club name has an ampersand.

league.xlsx, sheet "Table" (the "Fixtures" sheet is left out)
ABCD
1ClubPlayedWonPoints
2Rovers107=C2*3
3Brighton & Hove106=C3*3
data.html (default options)
<table>
  <thead>
    <tr>
      <th>Club</th>
      <th>Played</th>
      <th>Won</th>
      <th>Points</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Rovers</td>
      <td>10</td>
      <td>7</td>
      <td>21</td>
    </tr>
    <tr>
      <td>Brighton &amp; Hove</td>
      <td>10</td>
      <td>6</td>
      <td>18</td>
    </tr>
  </tbody>
</table>

Points arrives as the calculated 21 and 18, and the & in Brighton & Hove is written as &amp;. Excel's fonts, fills and borders are not copied; style the table with your own CSS through the class option.

What changes between Excel and HTML

Escaping

&, <, >, " and ' are turned into entities, so the value Brighton & Hove is written as Brighton &amp; Hove. Untick Escape HTML only if a column holds markup you want the browser to render.

Styling

The table has no inline styles. Type a class name (for example table table-striped for Bootstrap) and style it from your own CSS.

One sheet at a time

Only the sheet whose tab is active goes into the HTML: here "Table". Click the "Fixtures" tab to convert that sheet instead.

When to convert Excel to HTML

Excel to HTML in JavaScript

TabularJS reads every sheet; the snippet picks one by name. Then every value is escaped into a <table>.

import tabularjs from 'tabularjs';

const { worksheets } = await tabularjs('league.xlsx');
const sheet = worksheets.find((ws) => ws.worksheetName === 'Table');
const [header, ...rows] = sheet.data; // Points arrives as "=C2*3"

const esc = (v) => String(v ?? '').replace(/&/g, '&amp;').replace(/</g, '&lt;')
  .replace(/>/g, '&gt;').replace(/"/g, '&quot;');
const tr = (cells, tag) => '<tr>' + cells.map((c) => `<${tag}>${esc(c)}</${tag}>`).join('') + '</tr>';
console.log(`<table>\n<thead>${tr(header, 'th')}</thead>\n<tbody>\n` +
  rows.map((row) => tr(header.map((_, i) => row[i]), 'td')).join('\n') + '\n</tbody>\n</table>');

Unlike this page, TabularJS does not calculate formulas: Points comes back as "=C2*3". Dates arrive as serial numbers (45414 is 2024-05-02).

npm install tabularjs MIT licensed

Frequently asked questions

Are merged cells kept as colspan or rowspan?

No. The HTML has one <td> per grid cell: the merged value sits in the first cell of the range and the other cells are empty.

Can I paste the HTML into an email?

Yes. Tick Minify for one compact line, and add inline styles yourself, because many email clients ignore <style> blocks.

Which Excel files can I open?

.xlsx, .xlsm, .xlsb and the older .xls, plus .ods from LibreOffice. You can also copy a range in Excel and paste it into the box.

Can cells contain links or bold text?

Yes: type the HTML into the cell in the grid and untick Escape HTML, and the markup is passed through. Leave escaping on for data you didn't write yourself.

Does league.xlsx get uploaded when I convert it to HTML?

No. The workbook is opened in your browser and never uploaded.