On-device AI — professional-grade, fully private.

Documents

How to Convert Excel to HTML (A Clean HTML Table You Can Put on a Website)

Convert Excel to an HTML table: what carries over (merged cells, number formats, several sheets), which styling to pick, and how to embed it on a site.

Updated November 8, 20268 min read

To convert Excel to HTML, open the Excel to HTML converter, drop your XLSX, XLS, XLSB, ODS or CSV file on the page, and the sheet appears as an HTML table straight away. Pick a preset (Web page, CMS paste, Email or Raw data), check the preview, then copy the markup or download it as an .html file. The result is a plain table: th header cells, colspan and rowspan where the sheet has merged cells, and real links where the sheet has hyperlinks. Number formats come across as Excel shows them, so 0.5 formatted as a percentage arrives as 50.00%, not 0.5. Fonts, fill colours and borders do not carry over; you choose the table's styling instead. It all runs on your device, not our servers, and the free plan takes one workbook up to 25 MB and 500,000 cells.

Excel to HTML table: what carries over and what does not

A spreadsheet holds two kinds of information: the data and its structure, and the look. An HTML table converter keeps the first and rebuilds the second. Knowing which side each part of your sheet falls on saves you a surprise after you publish.

In your spreadsheetIn the HTML tableNotes
Merged cellscolspan and rowspanOr flatten them, if the table will be read by a program
Number formats, dates, currencyShown as Excel displays themSwitch Values to Raw for the underlying numbers
FormulasTheir resultThe formula itself is not part of the table
Hyperlinks in cellsReal linksOr text only; unsafe link types become plain text
Left, centre, right alignmentKeptNumeric columns are right-aligned
Line breaks inside a cellA br tag, a space, or keptYour choice under Line breaks in a cell
Several sheetsOne sheet, or every sheet in one fileEach sheet can get its own H2, H3 or H4 heading
Fonts, fill colours, bordersNot carriedReplaced by the styling mode you pick
Charts, pictures, commentsNot carriedThe converter works on cell values

The missing colours are the part people notice. If a red cell means "overdue", the colour will not survive, so put the meaning in the cell as text (a Status column that says Overdue) before you convert. That also helps anyone using a screen reader, who never sees the colour anyway.

Converting a spreadsheet to HTML, step by step

1

Add the spreadsheet

Open the Excel to HTML tool and drop the file, or press Choose a file. XLSX, XLSM, XLSB, XLS, ODS, FODS, CSV and TSV are accepted. The table appears with the Web page settings.

2

Pick a preset

Web page, CMS paste, Email or Raw data. Each one sets every option at once, and you can change any of them afterwards. The next section explains which to pick.

3

Choose the sheet and the range

Under Sheets and range, convert One sheet or Every sheet. If your data does not start at A1, type a range such as A3:F120 to leave out a title block above it or a totals row below it.

4

Set the headers

Headers: First row, First column, Both or None. A header row becomes a thead with th cells, which is what lets screen readers and search engines understand the columns.

5

Check the result and copy it

Switch between Preview and Source. Then press Copy to put the markup on the clipboard, or Download HTML for a file. If you change a setting later, the result is marked Out of date until you re-apply it.

Which preset fits where the table is going

The four presets differ mainly in how the table is styled and how the markup is wrapped. Where you will paste the table decides which one is right.

PresetUse it forWhat it sets
Web pageA standalone page, or a file to send someoneStyle block, full HTML document, scrolling container, H2 per sheet
CMS pasteWordPress, a wiki or any site with its own table CSSClasses only, body fragment, every empty row and column dropped
EmailA newsletter or email templateInline styles, body fragment, minified, no scrolling container
Raw dataA table another program will readRaw values, merges flattened, links as text, no styling

The styling choice matters most. Style block adds a short stylesheet with borders, a grey header and striped rows; every rule is tied to the converter's own class names, so pasting it into a page will not restyle that page's other tables. Inline writes the same look as a style attribute on each element, which makes the markup longer but is the only styling most email programs keep, because they strip style blocks. Classes only gives class names and no rules, for a site whose theme already styles tables. None gives bare structure.

Embedding the HTML table in a website

For a page you already have, you want the table alone, not a whole HTML document. Under Output, set Wrap to Body fragment (the CMS paste and Email presets already do). A Full document includes a doctype, a title and a head, which is right for a file you open on its own and wrong for pasting into the middle of a page.

  • WordPress and similar site builders: add a Custom HTML or code block and paste the fragment there. Pasting into the normal visual editor turns the tags into text or reformats them.
  • A site with its own design: use Classes only, then put your framework's classes in the Table class field (for example table table-striped) so the table picks up the site's look.
  • Linking to it from a script: give it a Table id, such as price-list, so code can find exactly that table.
  • A visible title: set Caption to Sheet name or Custom. A caption is announced by screen readers, which a bold paragraph above the table is not.

Keep the original spreadsheet. The HTML is a snapshot; when the numbers change, edit the sheet and convert again, rather than editing hundreds of td tags by hand.

Merged cells, ranges and several sheets

With Merged cells set to Keep as spans, a block merged across three columns becomes one cell with colspan="3", and the cells it covered are left out, exactly as the sheet looks. Flatten writes every cell separately and leaves the covered ones empty, which is easier for a program reading the table. If your range cuts through a merged block, the span shrinks to the part inside the range instead of disappearing. One rule comes from HTML itself: a header cell cannot stretch down into the body rows, so a tall merge in the header row is cut off at the header.

Real spreadsheets also collect empty space. Trim the end removes empty rows and columns after the data, which fixes a sheet that reaches row 1,000 because someone once formatted a cell there. Drop all removes every empty row and column, including spacer rows in the middle. Keep leaves the grid exactly as it is.

Choose Every sheet to put all sheets in one file, each under the heading you pick in Heading before each sheet (H2, H3, H4 or None). For a long table, the preview shows the first 200 rows and says so; the copied or downloaded HTML always has every row.

When a file will not convert

  • Password-protected workbook: the tool says it is protected. Remove the password in Excel, save a copy, and convert that.
  • Apple Numbers file: export it from Numbers as .xlsx first.
  • Over 25 MB or 500,000 cells on the free plan: the message shows the real size or cell count. Split the workbook into smaller files and convert each one.
  • Accented letters look wrong from a CSV: the converter reads CSV as UTF-8. Save the CSV as "CSV UTF-8" in Excel and add it again.
  • A Word document: that is a document, not a spreadsheet; use Word to HTML.
  • You only wanted to read the file: you do not need HTML for that. See how to open an Excel file online.

Turn a sheet into a clean HTML table with headers, merged cells and your choice of styling. Free: one workbook at a time, up to 25 MB and 500,000 cells, with every setting included. Pro: up to 50 workbooks at once as one ZIP. It all runs on your device, not our servers.

Convert Excel to HTML

HTML, CSV or PDF?

HTML is the right format when people will read the table on a web page or in an email: it fits the screen, its text can be searched and indexed, and it can match the site's design. If the data is going into another program or database, Excel to CSV is simpler than parsing a table. If you need a copy that looks the same everywhere and prints well, use Excel to PDF. A PDF cannot be restyled to fit a page, and a CSV loses merges and formatting entirely.

Frequently asked questions

How do I convert an Excel sheet to an HTML table?

Add the file to the Excel to HTML converter, choose a preset such as Web page or CMS paste, pick the sheet and headers, then press Copy or Download HTML. The free plan converts one workbook up to 25 MB and 500,000 cells.

Does converting Excel to HTML keep merged cells?

Yes. With Merged cells set to Keep as spans, each merged block becomes one cell with colspan or rowspan. Choose Flatten if the table will be read by a program that does not understand spans.

Why are my cell colours and fonts missing in the HTML?

The converter carries values, structure, alignment and links, not fonts, fill colours or borders. The look comes from the styling mode you choose. If a colour carries meaning, add it as text in a column before converting.

Can I convert every sheet in a workbook at once?

Yes. Under Sheets and range choose Every sheet, and all sheets go into one HTML file, each with an H2, H3 or H4 heading, or none.

How do I put an Excel table on my website?

Set Wrap to Body fragment, choose Classes only if your site already styles tables or Style block if it does not, copy the markup and paste it into your site builder's HTML or code block.

Can I use the HTML table in an email?

Yes. Pick the Email preset: it writes inline styles, which most email programs keep, and minified markup. Paste it into an email tool that accepts HTML, such as a newsletter template's HTML block.

Keep reading

More in Documents →