Guide
Generating clean HTML table code from CSV, Excel or pasted cells
Tables are among the most useful elements on a web page and among the most tedious to write by hand. A price list, a timetable, a comparison of plans or a set of results needs dozens of tags, and one missing closing tag shifts a column. This tool turns spreadsheet data into clean, accessible HTML table code.
Getting the data in
Paste cells copied from a spreadsheet, or drop a CSV, TSV or Excel file. The first row becomes the header row of the table; switch that off if your data has no header.
What the markup looks like
The table uses semantic elements: a <thead> containing header cells marked with scope="col", which screen readers use to announce the column for each value, and a <tbody> with the data rows. Columns that contain only numbers get class="num", so they can be right-aligned and numbers line up. An optional caption describes the table for all readers and search engines.
Escaping
Every value is HTML-escaped: ampersands, angle brackets and quotes become entities. Text such as <b> or <script> in your data therefore appears as text and can never change the page or run code. Line breaks inside cells become <br> tags.
Styling
“With a small style” adds a compact embedded stylesheet: light borders between rows, a tinted header, right-aligned numbers and optional zebra stripes. The table sits in a wrapper that scrolls sideways on narrow phone screens instead of breaking the page layout. “Plain markup” leaves styling to your website, which is better when your theme already styles tables or your editor removes <style> elements.
Class name and formatting
Set a class name that matches your site’s CSS conventions; the embedded style uses it so it does not affect other tables on the page. “One row per line” produces readable, indented code; switch it off for compact output.
Preview and export
The preview shows the table in an isolated, sandboxed frame. Copy the HTML into your page or CMS, or download a complete standalone HTML page, handy for sharing results as a single file or opening them in any browser.
Accessibility tips
Keep header names short and descriptive, add a caption that says what the table shows, avoid empty header cells, and do not use tables for layout. These small steps help screen-reader users and also make your content clearer for everyone.
Large tables
A table with a few hundred rows is fine on a web page. For thousands of rows, consider splitting it into pages or offering the data as a download instead, since very long tables load slowly on phones and are hard to read. The Split CSV File tool cuts data into parts if you want several smaller tables.
Updating the table later
Keep the spreadsheet as the master copy. When prices or times change, update the spreadsheet, generate the HTML again and replace the old table on the page. That is faster and safer than editing table code by hand.
Related tools
For documentation in Markdown, use CSV to Markdown Table. To escape snippets of text for HTML, try the HTML Encoder. To print a page as a PDF, use HTML to PDF.
Checked against the current version of the CSV to HTML Table on .

