How to convert Excel to HTML
The fastest way: drop your .xlsx workbook into the converter at the top of this page, pick the sheet, then copy the HTML or download a standalone .html file. The whole conversion runs in your browser using SheetJS — nothing is uploaded.
- Upload your Excel file (
.xlsxor.xls). - Pick a sheet if the workbook has more than one — each sheet becomes its own HTML table.
- Toggle the styling options:
- Include inline CSS — adds a
<style>block with sensible defaults so the table looks decent without any external stylesheet. - Bold first row as
<th>— promotes row 1 to<thead>with<th scope="col">, which is what screen readers expect. - Table class — adds a custom class on
<table>so you can target it from your own CSS.
- Include inline CSS — adds a
- Copy the HTML to your clipboard or download
.htmlfor a complete page.
The output is semantic HTML — <table>, <thead>, <tbody>, <tr>, <th>, <td> — with no Excel-specific markup, MSO conditional comments, or mso- style attributes.
Excel built-in: Save As Web Page
Excel itself can export to HTML via File → Save As → Web Page (.htm, .html). It works, but the markup is rough:
- Hundreds of lines of
<!--[if gte mso 9]>conditional comments for old Internet Explorer. - Inline styles on every cell (
mso-pattern,mso-protection, etc.) that no browser understands. - A separate
_filesfolder with images, theme XML, and stripped scripts. - File sizes 10–50× larger than the actual data.
The result renders, but it’s almost impossible to style or paste into a CMS cleanly. The converter on this page outputs lean HTML you can actually edit and embed.
Pasting Excel into a CMS
What works, what doesn’t, by platform:
WordPress
- Block editor (Gutenberg): switch to a Custom HTML block and paste the HTML from this tool. Don’t paste into a paragraph or a Table block — both will mangle it.
- Classic editor: click the Text tab (not Visual) and paste there.
- Direct paste from Excel: works in the Visual editor most of the time but drags in inline
font-family,mso-*attributes, and absolute widths. Strip them with a plugin like TinyMCE Advanced — or just use this tool’s clean output instead.
Notion
- Pasting Excel cells directly into a Notion page creates a Notion simple table with the right shape — but loses formulas, formatting, and merged cells.
- Pasting our HTML output into Notion does not render as a table — Notion treats raw HTML as text. To embed a styled HTML table in Notion, host the
.htmlsomewhere and use a/embedblock pointing to the URL.
Ghost
Use a HTML card (/html) and paste the converter output. Ghost will render it as-is, which is what you want.
Webflow / Framer / Squarespace
All have an Embed or Code block that accepts arbitrary HTML. Paste the output there. The inline <style> block scopes itself loosely — give your table a unique class name (the converter has an option for this) to avoid conflicts.
Markdown editors (Obsidian, Hugo, MkDocs, Astro)
Markdown allows raw HTML. Paste the converter output directly into the .md / .mdx file. If your renderer has GFM tables, you can also convert to that format manually for cleaner diffs — but for anything beyond a simple grid (merged cells, multi-line content), HTML is more reliable.
Styling the output table
The default inline CSS is intentionally minimal so it doesn’t fight your site’s design. Here’s a richer stylesheet you can drop in:
.csvquick-table {
border-collapse: collapse;
width: 100%;
font-size: 14px;
font-family: ui-sans-serif, system-ui, sans-serif;
}
.csvquick-table caption {
caption-side: top;
text-align: left;
font-weight: 600;
padding: 0.5rem 0;
color: #334155;
}
.csvquick-table thead th {
background: #f1f5f9;
text-align: left;
font-weight: 600;
padding: 0.5rem 0.75rem;
border-bottom: 2px solid #cbd5e1;
position: sticky;
top: 0;
}
.csvquick-table td {
padding: 0.4rem 0.75rem;
border-bottom: 1px solid #e2e8f0;
}
.csvquick-table tbody tr:hover td {
background: #fafbfc;
}
/* Right-align numeric columns by adding class="num" to the <th>/<td> */
.csvquick-table .num { text-align: right; font-variant-numeric: tabular-nums; }
/* Horizontal scroll on small screens */
.csvquick-table-wrap { overflow-x: auto; }
Wrap the <table> in <div class="csvquick-table-wrap">…</div> so it scrolls horizontally on phones instead of breaking your layout.
Accessibility: scope, caption, headers
A spreadsheet exported as HTML often loses the cues a screen reader needs. Three small additions go a long way:
1. Use <th scope="col"> for column headers
The converter does this automatically when “Bold first row as <th>” is enabled. The scope="col" attribute tells assistive tech that this header applies to every cell below it in the same column. For row headers (e.g. the leftmost column labels each row), use scope="row":
<tr>
<th scope="row">North America</th>
<td>1,240</td>
<td>1,510</td>
</tr>
2. Add a <caption>
Tables need a name. A <caption> is read first by screen readers, before any cells:
<table class="csvquick-table">
<caption>Q3 2024 sales by region (USD)</caption>
<thead>…</thead>
…
</table>
If the caption is visually redundant (you have an <h2> right above the table), hide it visually but keep it for AT:
.csvquick-table caption {
position: absolute; width: 1px; height: 1px;
overflow: hidden; clip: rect(0 0 0 0);
}
3. Don’t use tables for layout
If your “table” is really a grid of cards or a two-column layout, use CSS Grid instead. <table> should only describe tabular data with rows and columns that mean something together.
Common gotchas
Merged cells
sheet_to_html honors colspan/rowspan from merged Excel ranges, but the result can look uneven if the merge pattern is complex. Preview before publishing — and if the merges were just for visual grouping, consider un-merging in Excel first.
Formulas show values, not expressions
The HTML contains the cached value Excel computed when the file was saved. If you open a stale workbook with =NOW() cells, you get the saved timestamp, not the current one. Re-save in Excel to refresh.
Images and charts are dropped
Embedded images, chart objects, and shapes don’t make it into the HTML. Only cell values, text, and the structural grid are converted. For charts, export them as PNG from Excel and <img> them next to the table.
Excel colors and conditional formatting are lost
Cell fills, font colors, and conditional formatting rules don’t transfer — you’d need separate CSS per cell. If color-coding matters, mark cells in Excel with a sentinel value (e.g. [red] -120) and post-process the HTML with a small script that adds class names. For most use cases, a clean default stylesheet looks better than half-translated Excel colors.
Dates render as serial numbers if cells aren’t formatted
If a date cell shows 45000 instead of 2023-03-15, the column type in Excel is General not Date. Format the column as a date in Excel and re-save before converting.
Numbers lose thousands separators
1,234,567 in Excel becomes 1234567 in the HTML — the comma was display-only, not part of the value. Use CSS font-variant-numeric: tabular-nums to keep columns aligned, or add separators with a JS formatter on the client.
Privacy: nothing is uploaded
The Excel-to-HTML conversion runs entirely in your browser using SheetJS to read the workbook and a small in-house renderer for the HTML output. No file ever reaches a server — verify in DevTools → Network. Useful when the workbook contains internal numbers, customer data, or anything you wouldn’t paste into a public converter.
Related tools
- HTML to Excel — go the other direction: scrape an HTML table back into a workbook.
- Excel to CSV — flatten a workbook to plain CSV for databases or scripts.
- Excel to PDF — when you need pixel-perfect Excel rendering with colors and formulas intact, export to PDF instead.
Related tools
Convert any CSV file to a real .xlsx Excel workbook in seconds. Free, no signup, files never leave your browser.
Turn any .xlsx or .xls Excel file into a clean CSV. Pick the sheet, pick the delimiter, download. No upload.
Convert any Excel workbook (.xlsx or .xls) to a printable PDF in seconds. Pick the sheet, pick orientation, download. 100% private.
Convert any CSV file to a clean PDF table in seconds. Free, no signup, files never leave your browser.
Frequently asked questions
- How do I convert an Excel file to HTML?
Drop your .xlsx file into the converter at the top of this page, pick a sheet, then copy the HTML or download an .html file. Conversion runs entirely in your browser — nothing is uploaded.
- Can I paste the HTML into WordPress, Ghost, or another CMS?
Yes. Switch the WordPress block editor to a Custom HTML block (or use the 'Code' view in the classic editor) and paste the HTML there. Ghost and most CMSs have an equivalent HTML/embed block. Pasting into a regular paragraph block won't render the table — it shows as text.
- Will copy-paste from Excel into a CMS preserve the table?
Sometimes. Pasting Excel cells into Notion, Word, or Google Docs usually works because they understand the OS clipboard's HTML representation. Pasting into a plain CMS textarea or markdown editor usually drops the table or pastes inline styles you can't remove. Using this tool's clean HTML output is more reliable.
- Are formulas converted or just the values?
Just the displayed values. Formulas like =SUM(A1:A10) are evaluated by Excel when the file is saved, and the converter reads the cached results. The HTML contains the numbers your reader sees in Excel — not the formula expressions.
- What about workbooks with multiple sheets?
Each sheet becomes its own HTML table. The dropdown lets you pick the sheet to convert. To export all sheets, run the converter once per sheet and concatenate the outputs (or wrap each in a <section> with a heading).
- Is the output HTML accessible?
The 'Bold first row as <th>' option promotes the first row to <thead> with <th scope="col">, which is what screen readers expect. For full accessibility, add a <caption> describing the table and make sure column headers are meaningful — see the article below.
- Does the styling match Excel exactly?
No, and that's intentional. Excel cell colors, fonts, and conditional formatting don't map cleanly to web CSS. The converter outputs clean, semantic HTML with a minimal default stylesheet you can replace with your own. If you need pixel-perfect Excel rendering, export to PDF instead.
- Is my file uploaded anywhere?
No. The converter parses the .xlsx in your browser using SheetJS (xlsx). Your file never reaches a server. Verify in DevTools → Network.