HTML Table Generator

Configure your table, fill in the data, then copy or download the generated code.

Table Settings
Options
Table Data
Cells selected

The HTML Table Generator is a browser-based tool for building production-ready HTML tables without writing a single line of code.

Configure everything visually. Copy the output. Drop it anywhere.

What you can do:

  • Set border style, width, color, and radius

  • Choose header and body padding independently

  • Pick a font family and cell alignment

  • Add striped rows, hover highlights, and a responsive wrapper

  • Toggle inline styles or a standalone <style> block

  • Add id, class, or <caption> attributes to the table

Data entry is fast. Tab through cells like a spreadsheet. Arrow keys move between them. Paste or upload a CSV and the table populates instantly.

Full structural control:

  • Multiple header rows (up to 5) and an optional footer row

  • Merge cells across rows and columns with click-and-drag selection

  • Drag handles to reorder rows

  • Column resize handles in the editor

  • Undo/redo with Ctrl+Z / Ctrl+Y

Three output formats are available in the output panel: HTML code, Markdown table syntax, and a live preview. The preview only renders when you switch to that tab. Download the result as a .html file or copy it to the clipboard in one click.

How Does an HTML Table Generator Work?

The process follows 3 steps: data input, configuration, and code output. Each tool handles these differently, but the underlying mapping is the same.

96.3% of homepages had detectable WCAG failures in 2024 (WebAIM Million). Tables are a major contributor when generators skip accessibility attributes during output.

How Grid-Based Input Maps to Table Markup

Row-to-tag mapping: Each row in the grid becomes a <tr> element. Each cell becomes either a <td> (body data) or a <th> (header). The generator decides which based on whether you've flagged the first row as a header.

Styling options translate directly. A background color selection adds style="background-color:#f5f5f5" inline, or writes a class name if the tool supports class-based output.

  • Border settings map to border and border-collapse CSS properties
  • Padding controls become padding values on td and th
  • Alignment toggles add text-align to individual cells or the entire column

The final output is a copyable HTML string. Some tools also offer a Markdown or LaTeX toggle from the same interface.

How CSV and Spreadsheet Data Gets Converted

Most generators accept CSV paste or direct file upload. The tool parses the delimiter (comma, tab, semicolon), maps each field to a table cell, and wraps rows in <tr> tags.

Common parsing issue: cells containing commas require quoted fields, like "New York, NY". Tools that don't handle this correctly split the cell at the comma and produce extra columns.

Line breaks inside cells break most basic parsers entirely. Tableizer handles Excel and Google Sheets paste well. For programmatic conversion, pandas.DataFrame.to_html() in Python gives full attribute control over the output.

What HTML Attributes and Tags Does a Generator Produce?

Knowing the exact markup a generator produces matters before you paste it into a live project. Not all output is equal, and some generators still write deprecated attributes.

Core Structural Tags

A complete table uses 7 structural elements:

  • <table> - the outer container
  • <caption> - accessible title for the table
  • <thead>, <tbody>, <tfoot> - semantic row grouping
  • <tr> - individual rows
  • <th> and <td> - header and data cells

Most generators produce <table>, <tr>, <th>, and <td> reliably. The <caption> and <tfoot> elements are less consistent across tools.

Key Attributes and Deprecated Patterns

Modern attributes to expect in clean generator output:

colspan and rowspan for merged cells. scope="col" and scope="row" on <th> tags for screen reader compatibility. id, class, and style for styling hooks.

Deprecated attributes that some generators still produce:

bgcolor, align, and width as HTML attributes were dropped in HTML5. They still render in browsers, but they fail validation and signal sloppy output. If you see these in generated code, replace them with CSS equivalents.

Deprecated Attribute CSS Replacement
bgcolor="#f0f0f0" style="background-color:#f0f0f0"
align="center" style="text-align:center"
width="200" style="width:200px"
cellpadding="10" td { padding: 10px }

Whether the generator outputs semantic or presentational markup is the key question to answer before using any tool in a production project.

What Are the Best HTML Table Generator Tools?

Five tools cover most use cases: TableConvert, Tables Generator, Rapidtables, DIV TABLE, and Tableizer. They differ in input flexibility, output quality, and how much styling control they offer.

Tools for Developers (Code-First Output)

TableConvert is the most flexible option for developers. It accepts CSV, JSON, Excel, SQL, HTML, and Markdown as input formats, and outputs to all of them. The responsive wrapper toggle is a genuine time-saver. The HTML output is clean, with no deprecated attributes.

Tables Generator supports LaTeX, Markdown, and MediaWiki alongside HTML. Good for academic or documentation contexts where you need the same data in multiple formats. Accessibility output is partial, with scope attributes missing by default.

  • DIV TABLE outputs CSS Grid or <div>-based layouts as an alternative to traditional table markup
  • Useful when you want table-like presentation without the semantic table element
  • Output pairs well with existing grid system setups

Tools for Non-Technical Users (Visual-First Interface)

Tableizer is built for one thing: converting Excel and Google Sheets data to HTML. Paste spreadsheet content, click generate, get a styled table with inline CSS included. No configuration needed.

Rapidtables offers a simpler grid-based interface. It works well for users who just need a basic table with borders and headers quickly, without any import or export complexity.

Tool CSV Import Responsive Output Accessibility Attrs
TableConvert Yes Yes (toggle) Partial
Tables Generator Yes No Partial
Tableizer Excel/Sheets paste No No
DIV TABLE No Yes (div-based) No
Rapidtables No No No

How Do You Generate a Responsive HTML Table?

Default <table> markup breaks on screens narrower than the table width. The browser doesn't reflow table columns the way it reflows text, so cells get squished or force horizontal scrolling.

More than 60% of website traffic now comes from mobile devices (Statista, 2024). A table that only works on desktop is broken for the majority of users.

3 Methods for Responsive Tables

Method 1: overflow-x wrapper. Wrap the <table> in a <div> with overflow-x: auto. The table keeps its original structure but becomes horizontally scrollable on small screens. This is the simplest fix and works across all browsers without layout changes.

Method 2: display:block on tbody. Apply display: block to <thead>, <tbody>, <tr>, and <td> at a breakpoint (typically 600px). Each cell stacks vertically. Use td::before { content: attr(data-label) } to show column headers next to each value.

Method 3: CSS Grid replacement. Replace the <table> element entirely with <div> tags styled using CSS Grid. Gives the most layout control, but removes native table semantics.

TableConvert includes a responsive wrapper option in its output settings. For email templates, skip responsive tables entirely. Fixed-width media queries are stripped by Gmail's rendering engine, so table-based layouts stay fixed-width by design.

When to Avoid Responsive Tables

Fixed-width email templates are the clearest case. Outlook 2016-2021, Gmail, and Apple Mail require <table> for multi-column layouts, and the responsive approach actively breaks them.

Dense comparison tables with 8+ columns are also better handled with a horizontal scroll wrapper than a stacked layout. Stacking 8 columns per row produces an extremely long page on mobile.

How Do You Create an Accessible HTML Table?

Most generators produce non-accessible table markup by default. Accessible tables require specific structural elements that tools either skip or leave as optional.

94.8% of the top 1 million websites had at least one detectable WCAG failure in 2025 (WebAIM Million). Tables with missing header associations are one of the most common violations.

Required Accessibility Elements

WCAG 2.1 Success Criterion 1.3.1 requires that table structure conveys relationships programmatically. That means 4 elements need to be present:

  • <caption> - provides a visible title that screen readers announce before reading the table
  • <th scope="col"> or scope="row"> - tells screen readers whether the header applies to a column or row
  • headers attribute - required on complex tables with merged cells or multi-level headers
  • role="presentation" - used on layout tables in email to signal they are not data tables

Screen readers like NVDA, JAWS, and VoiceOver announce table headers before cell content, but only when scope is correctly set. Without it, a user hears a stream of numbers or text with no context.

Testing Generator Output for Accessibility

Run generated table code through WAVE or axe DevTools before using it in production.

WAVE flags missing <caption> and scope attributes. Axe DevTools catches header association failures on complex tables. Both tools are free and catch the most common table accessibility issues in under a minute.

Tables Generator includes partial scope output. TableConvert has an optional scope toggle in its settings. Every other major generator requires manual edits to the output before it passes a basic accessibility check. That's a real limitation worth knowing before you choose a tool.

How Do You Style an HTML Table with CSS?

Generator output is either unstyled or minimally styled with inline attributes. Neither version is production-ready without additional CSS table work.

Basic Table CSS Reset

Start here. These 3 properties resolve the most common visual issues in generated table output:

  • border-collapse: collapse - merges adjacent cell borders into one line instead of doubling them
  • width: 100% on table - prevents tables from collapsing to content width inside containers
  • table-layout: fixed - distributes column widths evenly rather than sizing to content

border-collapse: collapse vs. border-collapse: separate is a choice that changes how spacing works. Separate mode allows border-spacing between cells. Collapse mode doesn't. Pick one at the start and don't mix them.

Zebra Striping and Hover Effects

Two selectors handle most table interactivity:

tr:nth-child(even) { background-color: #f9f9f9; } creates alternating row colors without adding classes to every row. This pairs directly with generated markup since generators don't add row-level classes by default.

tr:hover { background-color: #eef4fb; } adds a highlight on mouse-over. For large data tables, this is genuinely useful for tracking which row you're reading.

Styling for Dark Mode

Using CSS custom properties makes dark mode table styling straightforward. Define variables at the root level, then override them in a prefers-color-scheme: dark block.

  • --table-border: #ddd becomes #444 in dark mode
  • --row-hover-bg: #eef4fb becomes #2a2a2a
  • --header-bg: #f0f0f0 becomes #1e1e1e

Inline styles from generator output don't respond to prefers-color-scheme. If dark mode matters to your project, replace inline styles with class-based CSS before deployment. Inline styles always for email. Class-based styles always for web pages.

How Do You Convert a CSV or Excel File to an HTML Table?

The most common real-world input is data that already exists in a spreadsheet. Nobody wants to retype 80 rows of product data into a grid interface.

HTML table to CSV conversion works in both directions, and the tools for each path are different. For CSV to HTML, TableConvert and Tableizer handle the most common cases well.

CSV Import Process in TableConvert

4-step process: paste CSV, set delimiter, toggle header row on or off, copy HTML output. The entire thing takes under 30 seconds for most datasets.

The delimiter setting matters more than it looks. A tab-delimited file set to comma delimiter splits nothing correctly. Tableizer is more forgiving here since it expects Excel-style paste directly rather than raw CSV.

  • Google Sheets path: File > Download > CSV, then import to any generator
  • Excel path: Save As > CSV, or paste cells directly into Tableizer
  • Python path: pandas.DataFrame.to_html() with full attribute control

You can also use a CSV to JSON converter as a midpoint if you need the data in a different format before generating table markup.

Edge Cases That Break Most Parsers

**Cells containing commas** require quoted fields: "Portland, OR". Without quotes, the parser creates an extra column at the comma.

Line breaks inside cells break every basic CSV parser. Either strip line breaks from cells before import, or use a tool with multiline cell support like TableConvert's advanced mode.

Encoding issues (UTF-8 vs. Windows-1252) cause garbled characters in headers and cells. Always check the first row of generated output for unexpected symbols before using the table in production.

How Do You Add Sorting and Filtering to an HTML Table?

Static HTML tables don't sort or filter. That requires JavaScript, either a library added to existing markup or a component that builds the table from configuration.

Data sets above 50 rows benefit from pagination and search. Below that, a static table usually works fine.

Using DataTables with Generator Output

DataTables is the most widely used JavaScript library for adding sort and filter behavior to existing HTML tables. Zero markup changes required on most generated tables.

Setup is 2 steps: include the DataTables CDN link, then call $('#tableId').DataTable(). The library reads your existing <thead> and <tbody> structure and adds controls automatically.

  • Sorting on every column by default
  • Search box filters across all columns simultaneously
  • Pagination kicks in automatically at 10 rows
  • Works with any generator output that uses proper <thead> markup

Tabulator as a Generator Alternative

Different approach entirely:

Tabulator builds the table from a JavaScript configuration object rather than from existing HTML. You define columns, data source, and behaviors in JS, and Tabulator renders the markup itself.

This means no generator output needed at all. Better for dynamic data from an API or database. Overkill for a static comparison table.

Library Works With Generator Output Best For
DataTables Yes, drop-in Adding sort/search to existing tables
Tabulator No, builds own markup Dynamic data, API-fed tables
List.js Yes, lightweight Simple search on small tables

Pure CSS sort indicators using :after pseudo-elements on <th> are visual only. They look like sort controls but do nothing without JavaScript behind them.

How Do You Use an HTML Table Generator for Email Templates?

Email templates are the one context where table-based layout is still the correct approach, not a legacy workaround.

60 to 70% of business users still rely on Outlook desktop versions that use the Word rendering engine (CaptainVerify, 2024). That engine requires <table> for multi-column structure. Flexbox and CSS Grid simply don't work.

Required Attributes for Email-Safe Tables

Web table markup and email table markup are different. Using generator output directly in an email template without modification usually breaks in at least one major client.

4 required attributes on every email table:

  • border="0" - removes default table borders
  • cellpadding="0" - removes default cell padding
  • cellspacing="0" - removes gaps between cells
  • role="presentation" - tells screen readers the table is for layout, not data

Inline styles are mandatory in email. Gmail and Outlook both strip class-based CSS. Every style attribute needs to be written directly on the element, not in a stylesheet.

Tools Built for Email Table Generation

Litmus reported that **41.6% of email opens** happen on mobile (2024). That stat makes responsive email tables a real concern, not just a nice-to-have.

Stripo and Unlayer both generate email-safe table markup with inline styles pre-applied. They handle the Outlook conditional comments and VML fallbacks that most web-focused generators skip entirely.

Avoid <thead> and <tfoot> in email tables. Some clients render them inconsistently. Stick to <table>, <tr>, and <td> for maximum cross-client reliability.

What Are the Limitations of HTML Table Generators?

Every free generator has gaps. Knowing them upfront saves time debugging output in production.

Structural Limitations

Merged cells: Most visual generators don't support colspan or rowspan through the grid interface. You get a flat table. Any merged cell structure requires manual edits to the generated HTML after export.

Nested tables (a <table> inside a <td>) are not handled by any visual generator interface. Email templates regularly need these for complex multi-column layouts.

Accessibility and Styling Gaps

Generated inline CSS conflicts with existing stylesheets when pasted into a CMS like WordPress or Webflow. Theme-level table rules override or compete with inline styles, producing unpredictable results.

Accessibility attributes missing from most free tool output:

  • scope on header cells
  • <caption> element
  • headers attribute for complex tables

Real-time data, sorting, and pagination require manual JavaScript integration after generation. No generator produces interactive table behavior on its own. The output is always a static starting point.

Limitation Workaround
No colspan/rowspan in UI Edit HTML output manually
Missing accessibility attrs Add scope, caption post-generation
Inline CSS conflicts in CMS Strip inline styles, use class-based CSS
No interactivity in output Add DataTables or Tabulator after export

How Do You Embed an HTML Table in WordPress?

TablePress has over **800,000 active installations** and is the most popular WordPress table plugin by a wide margin (WordPress.org). That number reflects how often developers need a better solution than raw HTML paste.

There are 3 paths for getting a generated table into WordPress: paste raw HTML, use the TablePress plugin, or use a page builder block.

Pasting Generated HTML Directly

In the Gutenberg block editor, insert a Custom HTML block and paste the generated table code. In the Classic editor, switch to Text mode first. Switching back to Visual mode before saving can corrupt the markup.

Common conflict: most WordPress themes apply their own table CSS rules. These override or compete with inline styles from the generator, especially on borders and cell padding.

Stripping all inline styles from generator output and replacing them with a single class that you control in the theme's custom CSS is cleaner than fighting specificity issues per table.

Using TablePress for Managed Tables

TablePress stores tables as database entries rather than raw HTML. Tables are edited in a spreadsheet-style interface inside the WordPress dashboard. No code required for basic use.

  • CSV and Excel import supported natively
  • Shortcode embeds the table anywhere in content
  • Gutenberg block and Elementor widget also available

TablePress moved to a freemium model in 2023. Responsive column visibility, row filtering, and advanced search are now Pro features at $89 per year. The free version still handles static comparison tables, pricing grids, and spec lists without issue.

WooCommerce-Specific Considerations

WooCommerce uses <table> for product attribute display on single product pages. Injecting a custom table into the wrong template hook can break the existing attribute table layout entirely.

Safe injection points: woocommerce_after_single_product_summary or a custom tab added via woocommerce_product_tabs filter. Both avoid the attribute table markup.

For data-heavy product pages, TablePress with server-side processing handles large datasets without performance issues. The Max plan ($189/year) supports this for tables with thousands of rows.

FAQ on HTML Table Generators

What is an HTML table generator?

An HTML table generator is a visual tool that converts structured input into ready-to-use table markup. You enter data into a grid interface, configure styling options, and get clean HTML table code output without writing a single tag manually.

Is an HTML table generator free to use?

Most are free. Tools like TableConvert, Tables Generator, and Rapidtables offer free online table builders with no account required. Some, like TablePress for WordPress, introduced paid tiers in 2023 for advanced features like responsive controls and filtering.

What HTML tags does a table generator produce?

Standard output includes <table>, <thead>, <tbody>, <tr>, <th>, and <td> tags. Better tools also add <caption> and scope attributes for accessibility. Deprecated attributes like bgcolor and align signal low-quality output.

Can I convert CSV or Excel data to an HTML table?

Yes. TableConvert accepts CSV paste or file upload and maps each field to a table cell. Tableizer handles Excel and Google Sheets paste directly. For programmatic conversion, pandas.DataFrame.to_html() gives full attribute control in Python.

How do I make an HTML table responsive?

Wrap the <table> in a <div> with overflow-x: auto for horizontal scroll on small screens. Alternatively, use media queries to switch cells to display: block at a 600px breakpoint, stacking rows vertically on mobile.

Are HTML tables accessible?

Only if built correctly. WCAG 2.1 requires <th> elements with scope attributes, a <caption>, and headers on complex tables. Most generators skip these by default. Run output through WAVE or axe DevTools before deploying.

Can I use an HTML table generator for email templates?

Yes, but web generator output needs modification first. Email tables require border="0", cellpadding="0", cellspacing="0", and role="presentation". All styles must be inline. Tools like Stripo and Unlayer generate email-safe table markup with these attributes pre-applied.

How do I add sorting and filtering to a generated HTML table?

Add DataTables via CDN and call $('#tableId').DataTable(). No markup changes needed. It reads your existing <thead> structure and adds sort controls, a search box, and pagination automatically. Works with output from any standard table generator.

How do I embed a generated HTML table in WordPress?

Insert a Custom HTML block in Gutenberg and paste the table code. For managed tables, TablePress stores tables as database entries and embeds them via shortcode or block, with CSV import and over 800,000 active installations.

What are the main limitations of HTML table generators?

Most free tools don't support merged cells