Free tools that run in your browser. Use any tool without an account.

Favourites Cart
Sign in
Join free

HTML Table Generator

quick HTML table code

  • Free
  • Runs in your browser
  • No account needed

Paste 5 rows and 4 columns from Excel and get immediate HTML with a header row if you choose. The tool detects tabs or commas, respects quoted CSV, escapes <, > and &, and updates live.

HTML
<table style="border-collapse: collapse; width: 100%;">
  <thead>
    <tr>
      <th style="border: 1px solid #d0d5dd; padding: 8px 12px; text-align: left;">Plan</th>
      <th style="border: 1px solid #d0d5dd; padding: 8px 12px; text-align: left;">Price</th>
      <th style="border: 1px solid #d0d5dd; padding: 8px 12px; text-align: left;">Users</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="border: 1px solid #d0d5dd; padding: 8px 12px; text-align: left;">Starter</td>
      <td style="border: 1px solid #d0d5dd; padding: 8px 12px; text-align: left;">NGN 5000</td>
      <td style="border: 1px solid #d0d5dd; padding: 8px 12px; text-align: left;">1</td>
    </tr>
    <tr>
      <td style="border: 1px solid #d0d5dd; padding: 8px 12px; text-align: left;">Team</td>
      <td style="border: 1px solid #d0d5dd; padding: 8px 12px; text-align: left;">NGN 20000</td>
      <td style="border: 1px solid #d0d5dd; padding: 8px 12px; text-align: left;">10</td>
    </tr>
    <tr>
      <td style="border: 1px solid #d0d5dd; padding: 8px 12px; text-align: left;">Business</td>
      <td style="border: 1px solid #d0d5dd; padding: 8px 12px; text-align: left;">NGN 60000</td>
      <td style="border: 1px solid #d0d5dd; padding: 8px 12px; text-align: left;">Unlimited</td>
    </tr>
  </tbody>
</table>
Rows and columns
4 rows, 3 columns
Runs in your browser. Your files and values are not sent to us. Report a problem
Advertisement

About the HTML Table Generator

This tool turns spreadsheet cells or CSV into clean HTML table markup you can copy. You can paste from Excel or Google Sheets or type comma, semicolon or pipe delimited text. Choose whether the first row is a header and pick one of three styling options: inline borders that work in email, class="table" only, or no styling. Every pasted separator is auto-detected, quoted CSV fields are respected, and every cell is HTML-escaped so <, > and & appear as text. The first row becomes <thead> with <th> when you mark it as a header; the remaining rows go into <tbody>. Results update instantly in your browser; nothing is uploaded. You can copy the HTML or create a share link that reopens the page with your numbers.

How to use it

  1. 1Paste or type your table data (paste from Excel or Sheets, or enter CSV).
  2. 2Set the First row option to Is the header or Is data.
  3. 3Pick Styling: Simple borders (inline CSS), class="table" only, or No styling.
  4. 4Copy the generated HTML or create a share link to reopen with your data.
Advertisement

Worked example

Input (tab-separated, as if copied from Excel): Name Age City Alice 30 London Bob 25 Paris If you mark the first row as a header and choose class="table" only, the output HTML is: <table class="table"> <thead> <tr><th>Name</th><th>Age</th><th>City</th></tr> </thead> <tbody> <tr><td>Alice</td><td>30</td><td>London</td></tr> <tr><td>Bob</td><td>25</td><td>Paris</td></tr> </tbody> </table>

How it works

The separator is detected (tab when pasted from a spreadsheet, or comma, semicolon or pipe), quoted CSV fields are respected, and every cell is HTML-escaped so <, > and & show as textThe first row becomes <thead> with <th> cells when it is a header, the rest go in <tbody>Short rows are padded with empty cellsResults update instantly as the visitor types; there is no calculate buttonVisitors can copy the result and share a link that reopens with their numbers

Source: WHATWG HTML Living Standard - TablesW3C WAI - Tables tutorial (accessibility). Last checked 7 November 2026.

What it is good for

  • Paste directly from Excel or Google Sheets and keep layout.
  • Three output styles: inline borders, class="table", or none.
  • Runs in your browser so your data stays local and is not uploaded.
  • Does not generate colspan or rowspan for merged cells.
  • No export formats besides HTML and the share link.
Advertisement

Questions people ask

Does the tool upload my spreadsheet to a server?

No. The conversion runs in your browser. Nothing you paste is uploaded, so your data stays local unless you explicitly create a share link.

How does the tool detect separators?

It detects a tab when you paste from a spreadsheet. For typed text it detects comma, semicolon or pipe. Quoted CSV fields are handled correctly.

Can I make the first row a header row?

Yes. Set the First row option to Is the header and the tool will wrap it in <thead> and use <th> cells. The rest of the rows go into <tbody>.

How are special characters handled in cells?

Every cell is HTML-escaped so characters like <, > and & show as text rather than HTML. That prevents accidental tag injection in the output.

How do I style the table for email?

Choose Simple borders (inline CSS). That option adds inline border styles which work in many email clients. For maintainable CSS choose class="table" and add your stylesheet.

What if some rows have fewer cells?

Short rows are padded with empty cells so the table keeps a consistent column count.

Help keep every tool free

FreeToolr stays free because people help it grow. Share a tool you like, tell us what to build next, or support us on Ko-fi.

Advertisement
Advertisement