HTML Table Generator
Create HTML tables with a visual editor. Customize rows, columns, alignment, header, borders, and stripes. Copy clean HTML code instantly.
4
4
1:
2:
3:
4:
<table style="border-collapse: collapse; width: 100%;">
<thead>
<tr style="background-color: #f8f9fa;">
<th style="padding: 8px; border: 1px solid #ddd;"></th>
<th style="padding: 8px; border: 1px solid #ddd;"></th>
<th style="padding: 8px; border: 1px solid #ddd;"></th>
<th style="padding: 8px; border: 1px solid #ddd;"></th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 8px; border: 1px solid #ddd;"></td>
<td style="padding: 8px; border: 1px solid #ddd;"></td>
<td style="padding: 8px; border: 1px solid #ddd;"></td>
<td style="padding: 8px; border: 1px solid #ddd;"></td>
</tr>
<tr>
<td style="padding: 8px; border: 1px solid #ddd;"></td>
<td style="padding: 8px; border: 1px solid #ddd;"></td>
<td style="padding: 8px; border: 1px solid #ddd;"></td>
<td style="padding: 8px; border: 1px solid #ddd;"></td>
</tr>
<tr>
<td style="padding: 8px; border: 1px solid #ddd;"></td>
<td style="padding: 8px; border: 1px solid #ddd;"></td>
<td style="padding: 8px; border: 1px solid #ddd;"></td>
<td style="padding: 8px; border: 1px solid #ddd;"></td>
</tr>
</tbody>
</table>All table generation happens in your browser. No data is sent to any server. Cell content is automatically HTML-escaped for security.
How to Use This Tool
- 1
Set table dimensions
Use the +/- buttons to adjust the number of rows and columns. Up to 20 rows and 12 columns are supported.
- 2
Enter cell content
Click on any cell in the grid editor to type your content. The first row becomes the header when "Header Row" is enabled.
- 3
Customize styling
Toggle options like bordered, striped rows, header background, and responsive wrapper to style your table.
- 4
Copy the HTML
Click "Copy" to copy the generated HTML table code. Paste it into your website, email template, or blog post.
Frequently Asked Questions
- Can I use this HTML in emails?
- Yes! The generated HTML uses inline styles, making it compatible with email clients that strip external CSS. Perfect for email newsletters and templates.
- Is the content HTML-escaped?
- Yes. All cell content is automatically escaped to prevent XSS attacks. Special characters like <, >, &, and quotes are safely encoded.
- Can I set column alignment?
- Yes! Use the alignment buttons (← ↔ →) below the options to set left, center, or right alignment for each column independently.
- What is the responsive wrapper?
- Enabling "Responsive Wrapper" wraps the table in a div with overflow-x: auto, making it horizontally scrollable on small screens.