HTML Table Generator
A free tool by DeepRit, a Google Ads agency that does PPC and nothing else. We build and run Google Ads accounts so every click is accounted for. Book a free audit call
Free HTML table generator. Paste rows from Excel, Google Sheets or a CSV file and get clean, accessible HTML table code and a Markdown table.
Free, no sign-up. Runs in your browser: nothing you type is uploaded or saved.
How to use the HTML table generator
Copy some cells from Excel, Google Sheets or Numbers and paste them into the box, or paste CSV text. The HTML table generator detects how the columns are separated (tabs from spreadsheets, or commas, semicolons or pipes) and instantly gives you:
- A live preview of the table.
- Clean HTML code, indented and ready to paste into a web page, a blog post or an email.
- A Markdown table, for README files, documentation, wikis and Markdown editors.
Options:
- First row is headings: the first row becomes
<th scope="col">header cells in a<thead>. - First column is headings: the first cell of each row becomes a
<th scope="row">, useful for comparison tables. - Caption: a title for the table, in a
<caption>element. - Class name: a CSS class on the
<table>, so you can style it.
Everything runs in your browser, and nothing you paste is uploaded.
Why write a table by hand?
Most website builders and blogging platforms have a table block, but the code they produce is often messy, full of inline styles, or missing proper header cells. Writing tables by hand is slow and error-prone. The HTML table generator gives you the clean, standard markup you'd write yourself, from data you already have in a spreadsheet.
Accessible tables by default
Screen readers rely on table markup to explain a table to people who can't see it. The generated HTML follows accessibility best practice:
<th>header cells withscope, so a screen reader can announce "Price: $8" rather than just "$8".<thead>and<tbody>to separate headings from data.<caption>to give the table a title that's read out before its contents.- No layout tables: tables are for data, not for arranging a page.
Every cell is escaped, so characters like <, > and & in your data show as text instead of breaking the page.
Styling your table
The HTML table generator produces plain, semantic HTML without inline styles, so it picks up your site's own table styles. To style it yourself, add a class name (for example, price-table) and some CSS:
.price-table { width: 100%; border-collapse: collapse; }
.price-table th, .price-table td { padding: 10px 12px; border-bottom: 1px solid #e4e4e4; text-align: left; }
.price-table thead th { background: #f5f5f4; }
To compress CSS for production, use the CSS minifier.
Tables on phones
Wide tables can overflow small screens. Wrap the table in a scrolling container:
<div style="overflow-x: auto">
<table>…</table>
</div>
Or keep tables to a few columns, and move detail into the text.
Markdown tables
The Markdown output uses the common "pipe table" format supported by GitHub, GitLab, many documentation tools and Markdown editors:
| Bread | Price | Available |
| --- | --- | --- |
| Sourdough | $8 | Every day |
Pipe characters inside cells are escaped so they don't create extra columns. To turn Markdown into HTML, use the Markdown to HTML converter.
Pasting data from different sources
- Excel, Google Sheets, Numbers: select the cells and copy; they paste as tab-separated text.
- CSV files: open the file in a text editor and copy the contents, or paste the text directly. Quoted fields with commas or line breaks inside are handled correctly.
- Semicolon-separated files, common in European versions of Excel, are detected automatically.
- JSON data: convert it to CSV first with the CSV to JSON converter, which converts both ways.
- Text from a web page: use the HTML to text converter to strip formatting first.
If some rows have fewer cells than others, the generator fills the gaps with empty cells so every row lines up.
Where tables help on a website
- Price lists and menus: clear, scannable prices.
- Comparison tables: plans, products or options side by side, with the first column as row headings.
- Opening hours.
- Specifications: sizes, materials, dimensions.
- Schedules and timetables.
Tables can also help search engines understand your content: a well-structured comparison or price table is easy for search engines to read, and sometimes appears in search results.
Tables in emails
Email apps support HTML tables well, and they're widely used to lay out emails. For a simple data table in an email, paste the generated HTML into your email builder's HTML block. Some email apps strip <caption> or CSS classes, so check the result in a test email.
Tables in blog posts and landing pages
A good table in an article makes complex information easy to compare. Keep them short, give each one a caption or a heading above it, and explain the key point in the text: not everyone reads tables.
Common HTML table mistakes
- Using tables for layout. Tables are for data in rows and columns. Use CSS Grid or Flexbox to arrange a page.
- Missing header cells. Without th elements, screen readers can't tell which column a value belongs to.
- Merged cells everywhere. colspan and rowspan make tables hard to read on phones and for screen readers. Use them sparingly.
- Too many columns on mobile. More than four or five columns rarely fit on a phone. Split the table or let it scroll sideways.
- Inline styles on every cell. Style the table once with CSS instead; it's easier to change later.
- Text that should be a list. If every row has one cell, it's a list, not a table.
The HTML table generator avoids most of these by producing simple, semantic markup with proper headers and no inline styles.
Adding a table to popular website builders
- WordPress: add a "Custom HTML" block and paste the HTML, or use the built-in Table block and paste from a spreadsheet.
- Shopify: in a page or product description, switch the editor to "Show HTML" and paste.
- Squarespace: add a Code block and paste the HTML.
- Wix: use an "Embed HTML" element, or the built-in table element.
- Webflow: use an Embed element.
After pasting, preview the page on a phone to check the table fits.
Sorting and filtering data first
The HTML table generator keeps your rows in the order you paste them. Sort and filter in your spreadsheet first, or tidy a list with sort lines and remove duplicate lines. Put the most important column first and the most useful rows at the top: most readers scan the first few rows and the first column.
Tables vs lists vs cards
Choose the right format for your content: a table when readers compare values across rows and columns, a list when items are in sequence, and cards when each item has a picture and a short description. If readers don't need to compare, a table is usually the wrong choice.
A worked example
A bakery wants a bread price list on its website. The owner already keeps the list in Google Sheets: bread, price and the days it's available. They select the cells, copy, and paste into the HTML table generator, which detects the tabs and shows a preview with "Bread", "Price" and "Available" as headings. They add the caption "Bread prices" and the class name "price-table", copy the HTML into the website's HTML block, and add four lines of CSS. The table looks right on desktop and phone, and screen readers announce each price with its bread.
Need more customers from Google?
This tool is free and runs in your browser. If your business also needs more leads or sales, Google Ads is where people search with their wallet out. DeepRit manages Google Ads for small and mid-size businesses, and only Google Ads. We check your account before we ever get on a call, then fix the structure, the keywords, the tracking and the ads, with month-to-month terms and no long contract. Book a free audit call.
For more developer tools, see the JSON formatter and the text to HTML converter.
Frequently asked questions
How do I make an HTML table from Excel?
Copy the cells in Excel, paste them into the HTML table generator, and copy the HTML it creates.
Does the HTML table generator support CSV?
Yes. Paste CSV text and it detects commas, semicolons, tabs or pipes, including quoted fields with commas inside.
Is the generated table accessible?
Yes. It uses header cells with scope, a thead and tbody, and an optional caption, and escapes every cell.
Can I get a Markdown table?
Yes. Every table is also shown in Markdown pipe-table format, ready for GitHub, wikis and Markdown editors.
How do I style the table?
Add a class name in the options and write CSS for that class. The HTML has no inline styles, so your site's table styles apply.
Is the HTML table generator free?
Yes. It's free with no sign-up, and it works entirely in your browser.
Free PPC audit
See where your ad budget leaks.
We look at your Google Ads account before the call, then walk you through what we'd fix first, in dollars. No obligation, no hard sell.