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