HTML to Excel Converter
Paste HTML table markup or upload an HTML file, preview the detected table, and download it as a private .xlsx workbook.
Preview
| Region | Quarter | Revenue |
| North | Q1 | 42000 |
| South | Q1 | 36500 |
How to Convert HTML Tables to Excel
- Paste or upload HTML - Paste markup into the box, or upload a saved .html or .htm file. A whole page is fine; only its tables are read.
- Pick the table - Every
<table>in the markup appears in the Detected table list with its row count. The preview below shows the first 20 rows of the one you choose. - Name the sheet - The Sheet name box starts at "HTML Table". Clear it to fall back to the table's
<caption>instead. - Convert and download - Press Convert to Excel, then Download Excel to save the .xlsx.
What the converter does with your markup
The markup is read by a small tag scanner rather than by the browser's HTML parser, so the same input produces the same rows whether the page is rendered on the server or in your browser. It walks the text looking for <table> elements and collects them in document order, naming each one after its <caption> where there is one and Table 1, Table 2 and so on where there is not.
- Rows and cells -
<tr>starts a row; each<td>and<th>adds one cell.<th>is not treated as anything special: a header row becomes the first row of data, not a frozen or bold header.<thead>,<tbody>and<tfoot>are read through in source order. - Cell text- what the browser would report as the cell's text content. Tags inside a cell are dropped and their text kept, so
<b>Ada</b> & <i>Grace</i>becomesAda & Grace. Only the ends are trimmed.<br>adds no separator at all, soa<br>barrives asabin one cell. - Noise -
<script>and<style>bodies are thrown away rather than treated as cell text, and comments, doctypes and processing instructions are skipped. A>inside a quoted attribute, as intitle="a > b", does not end the tag early. - Broken markup - an unclosed
<td>or<tr>is closed by the next one, so the tag soup you get from an old CMS still converts. - Empty cells - a cell holding nothing but whitespace becomes a blank cell rather than a space.
- File encoding - an uploaded file is decoded from its byte order mark first, then by testing for UTF-16, then UTF-8, and only then falling back to Windows-1252. A page saved as Latin-1 by an older system reads correctly instead of arriving as mojibake.
Every cell arrives as text
HTML carries no type information - 42000 and 00123are both just characters between two tags - so the converter writes every cell to the workbook as a string. Excel marks those cells with the green "Number stored as text" triangle, and SUM over the column returns 0 until they are converted.
The trade is a real one rather than an oversight. Writing everything as text is what keeps 00123, a leading-zero ZIP code and a phone number starting 0044 intact; guessing at numbers would silently destroy all three. When you do want real numbers, select the column in Excel and use Convert to Number, or run the downloaded file through Convert Text to Number.
Edge cases
- colspan and rowspan are ignored. Attributes are not read, so a cell spanning three columns produces one cell and the rest of the row shifts left. Merged header cells are the usual casualty.
- Nested tables split apart. A table inside a cell becomes its own entry in the dropdown, and the cell that contained it comes through empty in the outer table.
- Ragged rows stay ragged. Each row keeps however many cells it had; nothing is padded out to a rectangle.
- Links lose their URLs. An
<a href>contributes its visible text only. Images, form controls and CSS classes contribute nothing. - Unknown named entities stay literal.
&, ,—and the rest of the common set are decoded, as are all numeric references; anything outside that list is left in the cell exactly as written. - Sheet names get cleaned. Excel forbids
: \ / ? * [ ]in a sheet name and caps it at 31 characters, so those characters become spaces and long captions are truncated. - Layouts made of divs are invisible. If the grid on the page is built from
<div>elements rather than a real<table>, nothing is detected.
When to use a different tool
- Data that is comma or tab separated rather than marked up: CSV to Excel or TSV to Excel.
- Going the other way, worksheet to table markup: Excel to HTML.
- A Markdown or LaTeX table: Markdown to Excel or LaTeX to Excel.
- A table trapped in a PDF: PDF to Excel.
- Several converted tables that need to end up in one workbook: Excel Merge.
Frequently Asked Questions
Because every extracted cell is written to the .xlsx as a string. HTML has no type information - 42000 and 00123 are both just characters between two tags - so the converter does not guess, and Excel shows the green 'Number stored as text' triangle on those cells. The upside is that leading zeros in SKUs, ZIP codes and phone numbers survive. The cost is that SUM and AVERAGE ignore the column until you select it and use Excel's Convert to Number, or run the file through the Convert Text to Number tool.
Tag attributes are ignored, so a cell with colspan='3' produces one cell rather than three. Everything after it on that row shifts left and stops lining up with the header above. If your source table merges header cells, expect to realign the columns after downloading - the converter will not invent the missing cells for you.
No. Every table element in the markup is listed in the Detected table dropdown, in document order, but only the selected one is exported. Convert them one at a time, changing the sheet name between downloads, then combine the files with the Excel Merge tool if you need them in a single workbook.
Two things cause this. If the table sits inside another table, the inner one is listed as its own entry in the dropdown and the outer cell that held it comes through empty - pick the inner table. If the layout is built from div elements with CSS grid or flexbox rather than a real table element, nothing is detected at all, because the parser only looks for table, tr, td and th.
All numeric references (A and B forms) plus the common named set: amp, lt, gt, quot, apos, nbsp, ndash, mdash, hellip, the curly quote entities, copy, reg, trade, deg, euro, pound, yen, cent, middot and bull. A named entity outside that list is left in the cell as literal text, so you would see ℵ rather than the character.
Not on this page - it reads pasted text and uploaded .html or .htm files only. Open the page in your browser, use View Source or Save Page As, and paste or upload that. Selecting the table in the browser and copying it usually will not work either, because the clipboard gives you rendered text rather than the table markup.