How to use the HTML Table Generator
- 1. Paste the dataCopy cells from Excel or Google Sheets, or paste CSV. Tabs and commas are both detected.
- 2. Pick optionsHeader row, caption, style and the mobile scroll wrapper.
- 3. Copy the codeGenerate, check the preview and copy the HTML and CSS.
What you get
The generator writes semantic table HTML: <caption> for the title, <thead> with <th scope="col"> header cells so screen readers announce column names, and <tbody> for the data. All text is escaped, so a value like <b> shows as text instead of breaking your page.
Wide tables are the main problem on phones. The scroll wrapper puts the table in a <div class="table-wrap"> with overflow-x: auto, so the table scrolls sideways inside its box instead of stretching the whole page.
Worked example
The sample has a header row (Course, Duration, Mode) and 3 data rows, so the result says 3 rows × 3 columns, with a header row. With the Striped style, every even row gets a light grey background (tbody tr:nth-child(even)), which makes long tables easier to follow.
- Copying from Excel gives tab-separated text, which the tool detects automatically.
- CSV values with commas inside quotes, like "Noida, UP", stay in one cell.
- Short rows are padded with empty cells so every row has the same number of columns.
Tables are for data. For page layout, use CSS Grid or Flexbox instead; try the CSS grid generator. For very long data, consider adding a search box or splitting the table into pages, because a few hundred rows on one screen are hard for anyone to scan.
Frequently asked questions
Can I merge cells?
Not in the generator. Add colspan or rowspan attributes to the generated cells by hand.
How many rows can I use?
Up to 500 rows and 30 columns.
Will it keep my Excel formatting?
No. Only the text is copied. Colours and fonts come from the generated CSS.
Is it free?
Yes, free. Generating your first table asks for your name and WhatsApp number once, and then all Uncodemy tools open freely.