Browser-native file tools

Convert HTML to Excel

Paste HTML or upload a file — pick which <table> to extract, download a real .xlsx workbook. Handles rowspan, colspan, and multi-table pages.

Filename:.xlsx

How to convert HTML to Excel

The fastest way: paste your HTML into the converter at the top of this page, pick the right <table> from the dropdown, click Download .xlsx. You get a real Excel workbook — not a CSV pretending to be one — that opens cleanly in Excel, Numbers, LibreOffice Calc, and Google Sheets.

  1. Paste HTML or upload a .html file. You can paste the whole page source or just the <table>...</table> snippet — the parser finds every table either way.
  2. Pick the table. Many pages contain hidden layout tables. The dropdown shows row × column counts, so the data table is usually the one with the largest row count.
  3. Set the filename and decide whether to bold the first row (header styling).
  4. Click Download .xlsx. The file is built in your browser using the xlsx library and saved straight to disk.

Going the other direction? See Excel to HTML. Want a CSV instead? Use HTML to CSV.

HTML to Excel examples

Example 1 — A Wikipedia table

Say you want the List of countries by GDP as an Excel file. The walkthrough:

  1. Open the article.
  2. Right-click the table → Inspect (or press Ctrl+U for full source).
  3. Find the <table class="wikitable"> element. Select from the opening <table to the matching </table> and copy.
  4. Paste into the input above. The dropdown will show something like Table 1 — 195 rows × 7 cols.
  5. Click Download .xlsx.

The output preserves the country names, GDP figures, and rankings exactly. Citation superscripts ([1], [2]) come through as plain text — clean those out with Excel’s Find & Replace if you don’t want them.

Example 2 — A scraped product page

Many ecommerce specs pages render comparison tables in HTML. Save the page (Ctrl+S → Webpage, HTML Only), drop the .html file into the uploader, and the tool extracts every spec table on the page. Useful when you want to diff specs across vendors in Excel.

Example 3 — A BI dashboard export

Tools like Metabase, Looker, and Redash often offer “Export as HTML” but not “Export as XLSX”. Workflow: export to HTML, drop the file in, download .xlsx. Faster than re-running the query through a different export path, and the formatting (decimals, dates as ISO strings) survives the round-trip.

Pasting HTML directly into Excel — what gets lost

Excel’s Paste Special → HTML does work for trivial tables, but it falls apart on real-world markup. Specifically:

  • Rowspan/colspan misalignment. Cells that span multiple rows or columns end up in the wrong place — the rest of the table shifts.
  • Multi-line cells. A <td> containing <br> or <p> tags often becomes a merged-cell mess.
  • Inline styling. Excel pulls in font colors, background colors, and borders. Looks loud, hard to undo.
  • Hidden layout tables. If the page wraps the data table in a layout <table>, paste pulls the wrapper too, breaking column alignment.
  • Encoding issues. Non-ASCII characters (é, ñ, 中) sometimes paste as ? depending on clipboard format.

This converter parses the HTML structurally — it expands rowspan/colspan into actual cell positions, strips inline formatting, normalizes whitespace, and writes a clean .xlsx. The result opens identically on every machine.

How to scrape an HTML table to Excel

Three reliable paths depending on how much automation you want.

1. Browser only (this tool)

For one-off scrapes:

  1. View the page source (Ctrl+U).
  2. Copy the <table> block.
  3. Paste into the converter above.
  4. Download .xlsx.

Zero setup, zero code, zero upload.

2. Python with pandas.read_html

For repeatable scrapes, pandas reads tables directly off any URL:

import pandas as pd

# Reads every <table> on the page, returns a list of DataFrames
tables = pd.read_html("https://en.wikipedia.org/wiki/List_of_countries_by_population_(United_Nations)")

# Pick the right one — usually the largest
df = tables[0]
print(df.head())

# Write to xlsx
df.to_excel("countries.xlsx", index=False)

read_html handles rowspan/colspan, multi-index headers, and most messy real-world markup. Requires pip install pandas lxml openpyxl. Good for a one-shot script; combine with requests and a loop for periodic scrapes.

3. Browser DevTools copy(...)

For tables on JavaScript-rendered pages where the source view is empty:

  1. Open DevTools → Console.
  2. Run copy(document.querySelector('table.your-table-class').outerHTML).
  3. Paste into the converter above.

This grabs the rendered DOM (post-JavaScript), which the page-source view misses on SPA-style sites.

Common gotchas

Rowspan and colspan

Real-world HTML uses rowspan="2" / colspan="3" to merge cells visually. The converter expands these — the merged value is written into every position it covered, so columns stay aligned. If you want true Excel merged cells instead, use Excel’s Home → Merge & Center after import.

Embedded HTML in cells

Cells often contain <a href="...">link text</a>, <span style="...">, or <img src="...">. The converter writes the visible text only — link URLs are dropped, images are dropped, formatting is dropped. If you need URLs, run HTML to CSV on the source first and grep for href patterns separately.

Dates being interpreted weirdly

Excel auto-converts text it thinks looks like a date. A cell with 5-9 (intended as the score “5 to 9”) becomes 9-May. To avoid this:

  • Format the column as Text before pasting (rare workflow with .xlsx files).
  • Or prefix ambiguous values with a single quote: '5-9 (the quote isn’t displayed, just stops auto-conversion).
  • Or use HTML to CSV instead and import with Data → From Text/CSV, where you can set per-column types in the import wizard.

Numbers that look like text

If a column has thousand separators (1,234) or units ($1,234.56), Excel may keep them as strings. Use Data → Text to Columns (Delimited → next → next → finish) on the column to coerce them to numbers, or strip the symbols before converting.

Leading-zero IDs

Excel strips leading zeros from numeric-looking strings (0077). The converter writes cells as text by default to avoid this. If a column reverts to numbers after manual edits, pre-format it as Text via Format Cells → Text.

Privacy: nothing is uploaded

Parsing and .xlsx generation happen entirely in your browser. The HTML never reaches a server. Verify in DevTools → Network — there are zero requests when you click Download. Useful when the source HTML contains internal customer data, scraped content under NDA, or anything you wouldn’t paste into a public-facing converter.

After downloading, you might want to convert the Excel back to CSV, extract a different table to CSV, or render an Excel sheet as an HTML table for embedding back into a CMS.

Related tools

Frequently asked questions

  • How do I convert an HTML table to Excel?

    Paste your HTML (or upload a .html file) into the box above. The tool finds every <table> in the markup, lets you pick which one, then downloads it as a real .xlsx workbook you can open in Excel, Numbers, or Google Sheets.

  • Can I convert a Wikipedia table to Excel?

    Yes. Right-click a Wikipedia article → View Page Source (or press Ctrl+U), copy the section containing the <table class="wikitable">, paste it into the input above, pick the right table from the dropdown, and download. The tool handles rowspan/colspan correctly.

  • What if there are multiple tables on the page?

    The tool lists every <table> it finds in a dropdown, labelled by row × column count, so you can pick the one you actually want. Most large pages have hidden layout tables — the row/column counts make it easy to spot the data table.

  • Is text formatting preserved (bold, links, colors)?

    No. Excel cells store plain values, not HTML. Links and inline formatting are stripped — you get the visible text only. The 'Bold first row' option applies a header style to row 1 in the .xlsx output.

  • How is this different from copy-pasting an HTML table into Excel?

    Excel's paste sometimes works, but it often misaligns columns when the page uses rowspan/colspan, breaks on multi-line cells, and pulls in styling junk. This tool parses the HTML structurally and writes a clean .xlsx — the result opens identically everywhere.

  • How big a table can it handle?

    Comfortable up to ~50,000 rows. The conversion runs in your browser using the xlsx library — no upload, no server limit, just your device's RAM. Past 100K rows you may want to split the source first.

  • Does the .xlsx have correct data types?

    Cells are written as text by default — safest for things like leading-zero IDs, ZIP codes, and phone numbers. Once in Excel you can convert columns to Number/Date with Data → Text to Columns or by re-typing the column header.

  • Is my HTML uploaded?

    No. Parsing and .xlsx generation happen entirely in your browser using DOMParser and the xlsx library. Verify in DevTools → Network — there are zero requests when you click Download.