HTML Table to Excel turns the tables in a web page, or in its HTML source, into sheets of one .xlsx workbook, in your browser. The usual reason to need it: you copied a supplier's price list off their site, pasted it into Excel, and got the site's fonts and blue link text, with every part number stripped of its leading zeros. This tool reads the table's markup instead of relying on Excel's paste, so prices come out as numbers with a currency format, part numbers keep every digit and merged cells stay merged.
How to convert an HTML table to Excel
- Get the table into the box. On the web page, select the table, press Ctrl+C (Cmd+C on a Mac) and paste it in. You can also paste HTML source copied from a code editor or View Source, or drop an .html or .htm file of up to 50MB on the box.
- Read the list of tables found. Each one shows its caption or the heading above it, its size in rows × columns, how many merged cells it has, how many values became numbers or dates, and a preview of its first 5 rows and 6 columns.
- Tick the tables you want. All of them start ticked; "Untick all" clears every tick so you can pick one, and "Tick all" puts them back.
- Click "Convert N tables to Excel", then "Download .xlsx". An uploaded prices.html downloads as prices (xlsx.com).xlsx; pasted HTML downloads as tables (xlsx.com).xlsx.
The HTML never leaves your computer. It's read with the browser's own parser in a document with no window, so the page's scripts don't run and nothing it points at (images, stylesheets) gets loaded. That makes it safe to paste the source of a page you don't trust. It's free, with no sign-up and no usage limit.
When you copy a table in a browser, the clipboard holds its HTML alongside the plain text. The tool uses the HTML, which is how merged cells and links survive the trip.
What happens to each table
Every <table> in the HTML is listed in page order. Tables with no text in them, like empty spacer tables, are left out. A table nested inside another table's cell is listed as its own table, and its text stays out of the outer cell.
| In the HTML | In the workbook |
|---|
| Each ticked table | One sheet of the same workbook |
<caption>, or the nearest h1 to h6 heading above the table | The sheet name, otherwise Table 1, Table 2 and so on |
<thead>, <tbody>, <tfoot> | Rows in that order, as a browser shows them |
colspan and rowspan | Merged cells, placed the way a browser places them |
<th> cells | Bold |
| 1,234.50, 12%, $1,200, (1,000) | Real numbers: 1234.5, 0.12 shown as 12%, a currency format, -1000 |
| 00123, or a number over 15 digits | Text, exactly as written |
| 2024-03-05, 5 Mar 2024, March 5 2024, 05-Mar-2024 | Real Excel dates (the ISO one shown as yyyy-mm-dd) |
| 03/05/2024, 3.5.24, 31 Feb 2024 | Text |
| A link to an http, https, mailto or ftp address | An Excel hyperlink on the cell's text |
<br>, paragraphs or list items inside a cell | Line breaks in a wrapped cell |
| Empty rows at the end of a table | Dropped |
Sheet names follow Excel's rules. Characters Excel refuses are replaced, names are cut to 31 characters, and repeats become Prices, Prices (2). A table captioned "History" becomes History (2), because Excel reserves that name. Columns are sized to fit their text, between 8 and 60 characters wide.
Whitespace follows HTML's rules: a run of spaces and line breaks in the source collapses to one space, and anything inside <script> or <style> is skipped. A rowspan stops at the end of its section, as it does in a browser, and a badly formed table whose spans would overlap is placed so no two merges collide. The workbook opens in Excel for Mac with no repair prompt.
A cell that holds a link also stays text, even when its text is a number. Relative links like /products/42 are resolved against the page's <base> tag if it has one. Without one there's no address to point them at, so the link is left out, the text stays, and the page tells you how many were dropped. javascript: links are always left out.
Uploaded files are read in the encoding they declare, through a byte-order mark or a <meta charset> near the top, and as UTF-8 otherwise. An older page saved as windows-1252 keeps its é and £ instead of showing a question mark in a black diamond for each one.
Why a table pasted from a web page breaks in Excel
Excel's paste guesses at every cell using your computer's settings, and a web page wasn't written with Excel in mind.
Dates flip. Excel reads 03/05/2024 in your system's date order. Paste a UK page's table on a US machine and 3 May becomes March 5, silently, for every date with a day of 12 or under. Dates with a day of 13 or more can't be read that way, so they stay text, and the column ends up part wrong dates, part text. This tool refuses to guess. An all-number date stays text, and the page counts how many there are and links to the Date Converter, which turns them into dates once you say whether the order is day-month-year or month-day-year. Dates written with a month name in the common forms (5 Mar 2024, Mar 5, 2024, 05-Mar-2024) have one reading, so they become dates straight away.
Numbers stay text. Excel reads $1,200 and (1,000) fine. What stops a column summing is what the page puts around the digits. The tool ignores a non-breaking space before or after a figure, so 1,200 followed by one becomes the number 1200. These stay text here too: a space or non-breaking space used as a thousands separator (1 200), a footnote mark (1,200* or 1,200[1]), and a decimal comma (1.234,56). Convert Text to Number, with its comma option, turns the decimal commas and space separators in the download into numbers. Footnote marks need removing first; in Find and Replace, search for ~* to match a literal asterisk.
Codes lose their zeros. Excel turns a part number like 00123 into 123, and a 16-digit order ID loses everything past its 15th digit, since that's as much precision as Excel keeps. The tool leaves both as text, with every digit.
When a table can't be found
Only real <table> elements count. Plenty of sites, trading dashboards and admin panels especially, draw their grids from <div> elements styled to look like a table. To any HTML reader, those are a stack of boxes with no rows or columns, and the tool says so when it finds none.
Tables that the page's JavaScript fills in after loading are the other trap. They aren't in the HTML the server sent, so the page's source may hold an empty frame. Copy the table from the open page once it has loaded and you get what's on screen.
Getting a web table into Excel without a converter
Excel for Microsoft 365 on Windows can pull a table from a page by address: Data > From Web, paste the URL, choose the table in the Navigator, then Load, or Transform Data to clean it in Power Query first. The result is a query you can refresh, which makes it the better route for a page you'll re-import every week, like a league table or a daily rate sheet. It fails on pages behind a login and often on tables drawn by JavaScript. Excel for Mac's Power Query has no From Web source.
For a one-off paste, Home > Paste > Paste Special > Text drops the page's fonts and colours. You still get Excel's guessing on dates and codes, and no merged cells or links. If a pasted column won't sum, look for non-breaking spaces (character 160), which TRIM doesn't remove:
=VALUE(TRIM(SUBSTITUTE(A2,CHAR(160),""))) // delete non-breaking spaces, trim normal ones, then convert to a number
Limits
- No styling. Colours, fonts, borders, backgrounds and alignment from the page aren't copied. Only
<th> cells are made bold.
- No images. Images inside tables are left out, and the page counts them.
- No URL box. The tool can't fetch a page from your browser. Copy the table, or save the page as .html and upload it.
- Hidden text comes along. The tool doesn't apply the page's CSS, so text hidden with
display:none (a label the site shows only on phones, say) is read like any other text. Delete it in Excel afterwards.
- Real tables only. A grid built from
<div> elements isn't found at all. A table the page draws with JavaScript isn't in the HTML the server sent, so copy it from the open page instead.
Going the other way, Excel to HTML Table turns a sheet back into clean <table> markup for a web page or an email.
Questions
How do I convert an HTML table to Excel?
Copy the table on the web page and paste it into the box above, or paste the page's HTML, or drop a saved .html file on it. Every table is listed with a preview. Tick the ones you want, click Convert, and each becomes a sheet of one .xlsx workbook.
Why does a table from a website paste into one column in Excel?
It depends on where the values land. If each row sits in one cell with tabs between its values, select the column and use Data > Text to Columns, choose Delimited and tick Tab. If every value lands on a row of its own, the page's grid is usually built from div elements styled to look like a table, and no paste option or table converter will find columns in it.
Can Excel import a table from a website directly?
Yes, in Excel for Microsoft 365 on Windows: Data > From Web, enter the page address, pick the table in the Navigator and click Load. The query can be refreshed later to pull the latest numbers. Excel for Mac's Power Query has no From Web source, and pages that need a login or build their table with JavaScript often show no table at all.
Why won't numbers pasted from a website add up in Excel?
They arrived as text, usually because of a non-breaking space (character 160) that looks like a normal space and that TRIM doesn't remove. Replace CHAR(160) with nothing using SUBSTITUTE, then wrap the result in VALUE. A footnote mark after the figure, or a European 1.234,56 pasted on a US machine, stops the sum the same way.
Why did my dates change when I pasted a web table into Excel?
Excel reads a date like 03/05/2024 in your computer's date order, so a UK page pasted on a US machine turns 3 May into March 5 without a warning. Dates with a day over 12 can't be read that way and stay text, leaving a column half dates and half text. This converter keeps all-number dates as text and counts them, and the Date Converter turns them into dates once you say which order they're in.
Can I convert a table from a URL?
No, there's no URL box, because fetching another site's page needs a server and this tool runs entirely in your browser. Copy the table from the open page and paste it, or save the page as an .html file and drop that on the box.
Why does the tool say it found no tables?
The page has no real table elements with text in them. Many modern sites draw their grids from div elements styled to look like a table, and those aren't tables to any HTML reader. If the table only appears after the page loads, copy it from the open page rather than uploading a saved file.