HTML Table Generator
WM-64Paste rows from a spreadsheet or CSV file and get an accessible HTML table, with header cells marked so screen readers can follow them.
Runs in your browser. Nothing is uploaded.
CSV or TSV rows (first row is the header by default)
HTML
How to use it
- Paste CSV or TSV into the input box. Quoted fields and commas inside quotes are handled.
- Leave the separator on detect, or choose comma, tab, semicolon or pipe.
- Choose whether the first row is a header, the first column is a row header, and whether the first line is a caption.
- Copy the table into your page.
The structure the generator writes
The header row goes in a thead, the other rows in a tbody, and each header cell is a th with scope="col". If you tick First column is a row header, the cells of the first column become th elements with scope="row". The scope attribute tells assistive technology which cells a header covers, so a person hears the header with each value. A caption, from the first line when you choose that, gives the table a visible title. Tables are for data, not page layout.
What it does with messy data
Fields in quotes may contain the separator or line breaks. A row with fewer cells than the widest row is padded with empty cells so every row ends up the same width, and a quote that never closes is reported as an error. Spreadsheet copies are tab separated, which the detect option reads from the first row. Cell text is escaped, so characters like < and & show as typed. Numbers are copied exactly as written and are not aligned or formatted.
What you add afterwards
No borders, widths, striping or merged cells are added, so the table looks plain until you style it with CSS. Browsers show no borders on a table by default. If you need cells that span columns or rows, add colspan or rowspan by hand. The tool stops at 5000 rows and 100 columns to keep the page responsive, and it never sends your data anywhere: parsing runs in the page.
Error messages and what to do
| Message | What it means | Fix |
|---|---|---|
A quoted field is never closed (missing closing ") | A field starts with a quote but never ends with one. | Add the closing quote or remove the stray one. |
Paste CSV or TSV rows. The first row can be the header. | The input box is empty. | Paste at least one row of data. |
Questions people ask
How do I convert CSV to an HTML table?
Paste the CSV into the box. The tool parses it and writes table, thead, tbody, tr, th and td elements. Copy the result into your page.
How do I turn an Excel or Google Sheets range into an HTML table?
Copy the cells and paste them in. Spreadsheet copies are tab separated, and the detect option picks that up from the first row. Pasting from Google Sheets works the same way. The first row becomes the header unless you untick that option.
What does scope="col" do?
It tells assistive technology that the header cell applies to the column below it. Screen readers can then announce the header before each value. Use scope="row" for a header cell that applies to the rest of its row, which the row header option adds for the first column.
How do I add a caption to an HTML table?
Use the caption element as the first child of the table. Choose First line is the caption, and the tool writes it from the first line of your input.
Can I make the first column a header too?
Yes. Tick First column is a row header and those cells become th with scope="row". That helps readers of tables whose first column names each row, such as a product or month, and costs nothing visually.
About this tool
Reads delimited rows, including quoted fields with the separator or line breaks inside them, and writes table, thead, tbody, tr, th and td elements. Header cells get scope="col"; with the row header option, first-column cells get scope="row", which helps screen readers announce the right header. Short rows are padded with empty cells so every row has the same width. Cell text is escaped; no styling, borders or merged cells are added, and the table is for data, not page layout. Up to 5000 rows and 100 columns. Numbers are not reformatted or aligned.