<link rel="stylesheet" type="text/css" href="/mirawhite.css">

Excel to HTML table converter

Copy a range of cells in Excel or Google Sheets and paste it here: you get the code of a clean HTML table, ready for a website, a CMS or an email. Free; a CSV works too, and a Markdown version is one click away.

Free, no sign-up, no limit Runs in your browser: your text and files are never sent or saved.

Excel table to HTML

Options
Output
Shown above the table and read by screen readers.
Style

Bare HTML: only numbers get text-align:right. Your site’s CSS does the rest.

Converted in your browser: nothing is sent.

How to use it

  1. In Excel or Google Sheets, select the cells and copy them (Ctrl+C).
  2. Paste them in the box (Ctrl+V). A CSV text works as well.
  3. Choose the options: header row, caption, style, striped rows, responsive wrapper, alignment of numbers. They are remembered for next time.
  4. Check the preview, then copy the HTML code, or switch to Markdown.

Example

Input

Product	Price	Stock
Apples & pears	1.20	35
Plums	2.05	8

Output

<table>
  <thead>
    <tr>
      <th scope="col">Product</th>
      <th scope="col" style="text-align:right">Price</th>
      <th scope="col" style="text-align:right">Stock</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Apples &amp; pears</td>
      <td style="text-align:right">1.20</td>
      <td style="text-align:right">35</td>
    </tr>
    <tr>
      <td>Plums</td>
      <td style="text-align:right">2.05</td>
      <td style="text-align:right">8</td>
    </tr>
  </tbody>
</table>

Good to know

  • Only values are copied, not formatting: colours, merged cells and formulas are not carried over.
  • Every cell is HTML-escaped: “<b>” shows up as text, never as a tag.
  • A column is aligned right when all its non-empty cells are numbers (1,234.5 or 1 234,5, with %, €, $ or £ allowed).
  • The conversion runs in your browser: nothing is sent.

Frequently asked questions

How do I convert an Excel table to HTML code?

Select the cells in Excel and copy them (Ctrl+C), paste them here, then choose the header row, an optional caption and a style. Check the preview and copy the HTML: a <table> with <thead>, <tbody> and every cell escaped.

Can I keep the Excel formatting?

No: a copy only carries values, so colors, merged cells and formulas are lost. Choose “Inline borders” for a tidy look anywhere, or “CSS classes” to style it yourself. Excel’s File > Save As > Web Page keeps the formatting, but with much heavier code.

How do I put an Excel table in an email?

Choose the “Inline borders” style: borders, padding and a gray header are written in style attributes, which email clients keep. Paste the code into an editor that accepts HTML, or into your email template.

Will the table work on mobile?

Tick “Responsive wrapper”: the table is placed in a container that scrolls sideways on small screens instead of overflowing the page. Numeric columns are aligned right automatically, which keeps figures readable.

Can I get a Markdown table instead?

Yes: switch the output to Markdown (GFM). The first row becomes the header, pipes inside cells are escaped, and numeric columns get right alignment, ready for GitHub, a README or a wiki.

How do I copy an HTML table into Excel?

That is the reverse direction: select the table on the web page, copy it and paste it in Excel, which splits it into cells. For a table that updates, use Data > From Web. This tool goes from spreadsheet to HTML only.

← Back to all tools