HomeTools › HTML Table Generator

HTML Table Generator

Paste data from Excel or CSV, or build a grid visually — style borders, stripes and headers, then export clean, responsive, semantic HTML, Markdown, or CSV.

Striped rows
First row is a header (<thead>/<th>)

Press Ctrl+D (or Cmd+D on Mac) to bookmark this page.

How it works

Set dimensions or import data

Choose rows and columns manually, or paste data copied from Excel, Google Sheets, or a CSV file into the import box.

Edit cells directly

Click any cell in the live grid and type — changes update the preview and generated code instantly.

Style the table

Adjust border width/color, header colors, row striping, cell padding, alignment, and responsive mode.

Copy the code

Copy clean HTML, HTML with inline CSS, Markdown, or CSV — whichever format your project needs.

Export in multiple formats

The same grid data, in whichever format your project needs:



About the HTML Table Generator

This HTML table generator lets you paste data from Excel, Google Sheets, or a CSV file — or build a grid manually — then style it visually and export clean, semantic HTML, Markdown, or CSV. No sign-up, no uploads, everything runs in your browser.

Writing an HTML table by hand means tracking opening and closing tags for every single row and cell, which gets error-prone fast once a table grows past four or five rows. A visual table generator removes that tedium entirely: edit cells like a spreadsheet, and the correct <table>, <thead>, <tbody>, <tr>, <th>, and <td> markup is generated for you underneath.

Anatomy of an HTML table — the tags that matter

A semantic table separates structure from data using a small set of elements. <thead> wraps the header row, whose cells are marked <th> rather than <td> — this distinction is what lets screen readers announce "column: City" instead of reading header text as if it were just another data cell. <tbody> wraps the actual data rows. A <caption> element, placed immediately after the opening <table> tag, gives an accessible one-line summary of what the table contains. For headers that span multiple columns or rows, colspan and rowspan attributes merge cells without breaking the underlying grid structure.

Importing data from Excel or CSV

Copying cells directly from Excel or Google Sheets and pasting them into the import box works out of the box — spreadsheet copies use tab characters between cells, which this tool detects automatically. Raw CSV text works the same way, including values that contain commas as long as they're wrapped in quotes (standard CSV escaping) — a common snag that breaks simpler paste-to-table tools when a cell like "New York, NY" splits into two columns instead of one.

Styling and responsive behavior

Borders, header background color, cell padding, text alignment, and striped rows are all adjustable live, with the preview updating instantly. For layout on smaller screens, two responsive modes are available: Scroll wraps the table in a horizontally scrollable container so a wide table never breaks your page's layout, while Stack outputs a mobile-first variant that reflows each row into a labeled block on narrow viewports — both are pure CSS, with no JavaScript required once the code is pasted into your own site.

Export formatBest forNotes
Plain HTMLSites with their own stylesheetNo inline styles — style via CSS classes
HTML + inline CSSWordPress, Wix, Squarespace, Webflow embedsRenders correctly with zero theme setup
MarkdownREADME files, GitHub, documentation sitesGitHub-flavored table syntax
CSVRe-importing into a spreadsheetQuoted values preserved

Choosing the right export format for your project

💡 Key takeaways

  • Free HTML table generator — paste Excel/CSV or build a grid, instantly in your browser
  • Auto-detects tabs vs. commas and handles quoted CSV values correctly
  • Semantic markup — proper thead/tbody, th vs td, optional caption
  • Export as plain HTML, HTML with inline CSS, Markdown, or CSV
  • Two responsive modes — horizontal scroll or mobile-stacked rows
💡

Pro tip: When pasting into WordPress or a page builder, use the "HTML + inline CSS" tab — it renders correctly immediately, without depending on your theme's own table styles.

Accessibility notes

A table is accessible when assistive technology can tell which cells are headers and which are data, and — ideally — what the table is about before diving into individual rows. Using real <th> elements and an optional <caption> covers both, satisfying the relevant WCAG guidance without adding any ARIA attributes for a straightforward data table.

Why choose our tool?

100% Private

Everything runs in your browser. Your data never leaves your device — no uploads, no server processing, no tracking.

Instant Results

No loading screens, no waiting, no queues. Results appear the moment you type — powered by client-side JavaScript.

No Sign-Up Ever

No accounts, no emails, no passwords. Just open the page and start using it — forever free, no strings attached.

Works Everywhere

Phone, tablet, laptop, desktop — any browser, any OS. Fully responsive and works offline once loaded.

Also useful if you searched for: html table generator, html table maker, table generator online, create html table, css table generator, csv to html table converter, paste excel to html table, responsive html table generator, accessible html table generator, html table generator with borders, html table code generator free, html table generator for wordpress.

Frequently asked questions

How do I convert Excel or CSV data into an HTML table?
Copy your cells directly from Excel or Google Sheets (or paste raw CSV text) into the Import box and click Import. The tool auto-detects tabs vs commas, handles quoted values containing commas, and fills the grid instantly — no manual row-by-row entry needed.
What's the difference between <thead>, <tbody>, and plain rows?
<thead> wraps your header row and uses <th> cells, which screen readers and search engines treat as column labels rather than data. <tbody> wraps the actual data rows in <td> cells. Separating them is what makes a table semantic instead of just visually table-shaped.
How do I make an HTML table responsive on mobile?
This tool offers two responsive modes: Scroll wraps the table in a horizontally scrollable container so wide tables don't break your page layout, and Stack switches each row into a labeled card on narrow screens using CSS content and data-label attributes, with no JavaScript required on your site.
Do I need colspan or rowspan for merged headers?
Only if a heading needs to span multiple columns or rows — for example, a "Q1 2026" header sitting above three monthly sub-columns. For straightforward data grids, a single header row with one <th> per column is simpler and just as valid HTML.
Should I use inline styles or a CSS class for table styling?
Inline styles (what this tool outputs by default) work everywhere instantly, including WordPress, Wix, Squarespace, and Webflow embeds where you can't easily add external CSS. A CSS class is cleaner if you're editing your own stylesheet and want to reuse the same table style across many pages.
Is a table still valid for accessibility if it has no caption?
Yes, a caption is optional, but adding one gives screen reader users an immediate summary of what the table contains before they navigate into it — which is why the WCAG guidelines list it as a recommended, not mandatory, practice.
Can I export the same table as Markdown or CSV instead of HTML?
Yes — the code section below the table includes tabs for plain HTML, HTML with inline CSS, GitHub-flavored Markdown table syntax, and raw CSV, all generated from the same grid data.
Why does my pasted table look broken with extra columns?
This usually happens when a cell contains a comma but wasn't wrapped in quotes by the source spreadsheet. Re-copy the data directly from Excel or Google Sheets (which uses tabs between cells, not commas) rather than a plain-text CSV export, and the import will split correctly.
How many rows and columns can this tool handle?
The grid is built and edited entirely in your browser, so it comfortably handles typical documentation and report tables — dozens of rows and columns — though very large datasets are better suited to a spreadsheet than an HTML table.
Is my table data saved or uploaded anywhere?
No — everything runs client-side in your browser with JavaScript. Nothing is uploaded, stored, or sent to any server.

Related tools