Web Analytics

 HTML Table Generator

Create an HTML table without writing a single line of code. Start a new table or import an existing Excel (.xlsx, .xls) or CSV file, edit the cells in a spreadsheet-like table editor, pick a few simple options such as header row, border, width and text alignment, and watch the live preview update instantly. The HTML table generator produces clean, semantic HTML with <thead>, <tbody>, <th> and <td> that you can copy straight into your website, blog or CMS. Everything runs client-side in your browser โ€” your Excel and CSV files are never uploaded to a server.

๐Ÿ“ฅ Import Excel or CSV

Drop an Excel or CSV file here

.xlsx, .xls, .csv, .tsv or .txt โ€” your file never leaves your browser

This Excel file contains several worksheets. Choose the sheet you want to turn into an HTML table.
๐Ÿ†• New table
โœ๏ธ Table editor 0 rows ยท 0 columns ยท 0 cells
Click a cell to edit it. Press Enter to move down, Tab to move right. You can also paste cells copied from Excel or Google Sheets straight into the table.
โš™๏ธ Table options
๐Ÿ‘๏ธ Live preview
โœ“ HTML copied to clipboard.

โญ HTML Table Generator โ€“ Explanation & Examples

The HTML Table Generator turns spreadsheet data into a ready-to-use HTML table. Import an Excel or CSV file (or start with an empty table), edit the cells in a visual table editor, check the live preview and copy the clean HTML into your website, blog, newsletter or CMS. You do not need to know anything about HTML: the generator writes the <table>, <thead>, <tbody>, <th> and <td> tags for you.

The whole workflow is: Import Excel/CSV โ†’ check or edit the table โ†’ preview โ†’ Copy HTML.


๐Ÿ”Ž What does the HTML table generator do?

  • Creates a new HTML table from scratch โ€“ choose the number of rows and columns and type your content.
  • Converts Excel to an HTML table โ€“ import .xlsx or .xls files, pick a worksheet and the data appears in the editor.
  • Converts CSV to an HTML table โ€“ import comma, semicolon, tab or pipe separated files; the separator and text encoding are detected automatically.
  • Lets you edit every cell โ€“ add or delete rows and columns, move columns, clear contents and set the first row as header.
  • Shows a live preview that looks like a real HTML table, not a spreadsheet.
  • Generates clean, semantic HTML with proper indentation and escaped special characters.

โš™๏ธ How to convert Excel or CSV to an HTML table

  1. Drop your Excel or CSV file on Drop an Excel or CSV file here, or click Import Excel, Import CSV or Choose file.
  2. If the Excel workbook contains several worksheets, pick the sheet you want in the Worksheet list.
  3. For CSV files, check the detected separator and encoding. If a column looks wrong, choose a different Separator (comma, semicolon, tab or pipe).
  4. Review the data in the Table editor. Click any cell to change its text, use Add row, Add column or the ร— buttons to remove rows and columns, and use โ—€ โ–ถ to move a column.
  5. Leave First row is header switched on if the first row contains column titles.
  6. Adjust the Table options: border, responsive table, width, cell padding, text alignment and caption.
  7. Check the Live preview and click Copy HTML or Download HTML.

๐Ÿ’ก Example 1: a simple table with a header row

Data in the editor:

Product        | Price | In stock
Wireless mouse | 24.95 | Yes
USB-C hub      | 39.00 | Yes

Generated HTML (styling switched off):

<table>
  <thead>
    <tr>
      <th scope="col">Product</th>
      <th scope="col">Price</th>
      <th scope="col">In stock</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Wireless mouse</td>
      <td>24.95</td>
      <td>Yes</td>
    </tr>
    <tr>
      <td>USB-C hub</td>
      <td>39.00</td>
      <td>Yes</td>
    </tr>
  </tbody>
</table>

The first row becomes a <thead> with <th scope="col"> cells; all other rows go into the <tbody>. This is the structure search engines, screen readers and CSS frameworks expect.


๐Ÿ’ก Example 2: border, width and responsive wrapper

With Add border, Responsive table and Table width: 100% switched on, the generator adds a small <style> block and a scrolling wrapper. Everything is plain HTML and CSS โ€“ no JavaScript.

<style>
  .data-table { border-collapse: collapse; width: 100%; }
  .data-table th, .data-table td { border: 1px solid #cccccc; padding: 8px; text-align: left; }
  .data-table th { background-color: #f2f2f2; font-weight: bold; }
  .table-wrapper { overflow-x: auto; }
</style>

<div class="table-wrapper">
  <table class="data-table">
    ...
  </table>
</div>

On a phone or a narrow column the table can scroll sideways instead of breaking the page layout. If your website already styles tables, switch Include styling off and paste only the bare table.


๐Ÿ’ก Example 3: special characters are escaped automatically

Spreadsheets often contain characters that have a special meaning in HTML. A cell with the text

Price < 50 & "in stock"

is written to the HTML as

<td>Price &lt; 50 &amp; &quot;in stock&quot;</td>

so the browser shows exactly what was in the cell instead of interpreting it as a tag. Line breaks inside a cell are converted to <br>, and empty cells become empty <td></td> elements so the columns stay aligned.


๐Ÿ’ก Example 4: a Dutch or European CSV with semicolons

Excel in many European countries saves CSV files with a semicolon as separator:

Naam;Plaats;Bedrag
Jansen;Amsterdam;12,50
De Vries;Utrecht;8,75

The CSV importer detects the semicolon automatically and shows Detected separator: Semicolon. Values such as 12,50 stay exactly as they are. If the detection ever picks the wrong character, select the right separator and the table is rebuilt immediately.


โš™๏ธ Table editor features

  • Edit cells โ€“ click a cell and type. Enter moves to the cell below (and adds a new row at the bottom), Tab moves to the right.
  • Paste from Excel or Google Sheets โ€“ copy a block of cells in your spreadsheet and paste it into a cell; the block fills the table from that cell onwards.
  • Add row / Add column โ€“ appends a new empty row or column.
  • Delete row / Delete column โ€“ use the ร— button next to a row number or column letter.
  • Move column โ€“ use โ—€ and โ–ถ in the column header to reorder columns.
  • Clear contents โ€“ empties every cell but keeps the rows and columns.
  • First row is header โ€“ marks the first row as <th> cells inside <thead>.

โš™๏ธ Table options explained

  • Add border โ€“ draws a thin grey line around every cell.
  • Responsive table โ€“ wraps the table in a container that scrolls horizontally on small screens.
  • Include styling โ€“ adds a compact <style> block with the border, padding, alignment and width settings. Switch it off for pure HTML without any CSS.
  • Table width โ€“ Auto (as wide as the content), 100% (full width of its container) or a custom value such as 600px or 80%.
  • Cell padding โ€“ space inside each cell in pixels.
  • Text alignment โ€“ left, center or right for all cells.
  • Caption โ€“ an optional title that is added as a <caption> element above the table.

โญ When do you need an HTML table generator?

  • Publishing a price list, schedule or product comparison from Excel on your website
  • Adding a data table to a WordPress, Joomla, Drupal or Shopify page without a table plugin
  • Converting a CSV export from a shop, CRM or database into a table for a report or intranet page
  • Building tables for HTML newsletters and email templates
  • Creating documentation, knowledge-base articles or Markdown/HTML wiki pages with tabular data
  • Quickly prototyping a table layout before styling it with your own CSS

โš ๏ธ Things to keep in mind

  • All processing happens in your browser. Excel and CSV files are never uploaded to a server.
  • Merged cells, colours, fonts and formulas from Excel are not carried over โ€“ only the displayed cell values are imported.
  • Excel dates and numbers are imported as they are displayed in Excel (the formatted text), not as raw values.
  • Very large files: the editor shows 100 rows per page and the preview shows the first 200 rows, but the generated HTML always contains every row. To keep your browser responsive, imports are limited to 200,000 cells.
  • The generated code contains no JavaScript, so it does not include click-to-sort behaviour. Add your own script or a table plugin if you need sortable columns.

๐Ÿ”Ž Try the tool

Drop an Excel or CSV file, check the table, and copy the HTML โ€“ or click Load example to see how a finished table looks. No sign-up, no upload, no HTML knowledge required.


This tool is also known as

  • html table generator online
  • excel to html table converter
  • csv to html table generator
  • create html table from spreadsheet
  • html table code generator with preview

Frequently Asked Questions

It creates a ready-to-use HTML table from your data. You can start with an empty table or import an Excel (.xlsx, .xls) or CSV file, edit the cells in a visual table editor, check the live preview and copy clean HTML with thead, tbody, th and td tags. No HTML knowledge is needed.

Click Import Excel or drop your .xlsx or .xls file on the drop area. If the workbook has several worksheets, choose the sheet you need. The data appears in the table editor, the live preview updates automatically and you can click Copy HTML to copy the table code.

Click Import CSV or drop the .csv file on the drop area. The separator (comma, semicolon, tab or pipe) and the text encoding are detected automatically. If a column looks wrong you can pick another separator and the table is rebuilt instantly.

No. The file is read entirely inside your browser with JavaScript. Nothing is sent to WebTextTools.com or any other server, and the data disappears when you close or reload the page.

Yes. Semicolon-separated files, which Excel creates in many European countries, are detected automatically. Tab-separated (.tsv) and pipe-separated files also work, and you can always select the separator manually.

Yes. Every cell is directly editable. You can add and delete rows and columns, move columns left or right, clear all contents, and switch the first row between header and normal row. You can even paste a block of cells copied from Excel or Google Sheets straight into the editor.

Leave the First row is header switch on. The first row is then written as th cells inside a thead element, and the remaining rows go into tbody. Switch it off if your data has no column titles.

It wraps the table in a container that can scroll horizontally. On phones and narrow layouts a wide table then scrolls sideways instead of overflowing the page or breaking the design. The wrapper is plain HTML and CSS without JavaScript.

The generated code never contains JavaScript. When Include styling is switched on, a small style block with the border, padding, alignment and width settings is added above the table. Switch it off to get bare, semantic HTML that uses the styles of your own website.

Yes. Characters that have a meaning in HTML (<, >, & and double quotes) are escaped in every cell, so text such as "Price < 50" is displayed exactly as typed instead of being interpreted as a tag. Line breaks inside a cell become <br> tags and empty cells become empty td elements.

Yes. Type a title in the Caption field and a caption element is added to the table. It is shown above the table in the preview and in the generated HTML.

The tool handles thousands of rows. The editor shows 100 rows per page and the preview shows the first 200 rows, but the generated HTML always includes all rows. To keep your browser responsive, imports are limited to 200,000 cells; if your file is larger, only the first rows are imported and a clear notice is shown.

Not from this tool, because the generated HTML intentionally contains no JavaScript. The clean thead/tbody structure does make it easy to add sorting later with a small script or a table plugin in your CMS.

Yes. Copy the HTML and paste it into the code or HTML view of your editor (for example a Custom HTML block in WordPress). The table uses standard HTML that works in any website, blog, newsletter or documentation system.

Our web tools

General
Generate
HTML entities
Text to HTML
Clean code
URL
  • URL cleaner
    Clean, normalize, and sanitize URLs in bulk โ€” remove UTM, fbclid, gclid and other tracking parameters
  • URL parser
    Parse URL structure, query values, tracking parameters, and generate a clean URL
Web colors
Compress
Encoding & decoding
Extract