HTML Table Generator

Build an accessible HTML table from a grid or pasted CSV, with styles and preview.

About this tool

Type into the grid, add or remove rows and columns, and set each column's alignment. Or paste cells copied from Excel or Google Sheets, or CSV text, and press Import. Numeric columns are right-aligned automatically. Choose a header row and header column, a caption, a CSS class and a striped, bordered or minimal style, and decide whether to include the CSS. The preview and the HTML update as you go.

How to make an accessible HTML table

Tables are for tabular data, such as prices, schedules or comparisons, not page layout. An accessible table has a <caption> that says what it shows, column headers in <th scope="col"> inside <thead>, and row headers in <th scope="row"> when the first column labels each row. Screen readers can then announce the matching header with every value. Right-aligning numbers lines up the digits so they are easy to compare, which is why imported numeric columns switch automatically. All cell text is escaped, so characters such as < and & display correctly instead of breaking the markup. On small screens, wrap wide tables in a container with horizontal scrolling rather than squeezing them. Use the included CSS as a starting point, or leave it out and let your site's own styles apply through the class name. The Markdown table generator makes tables for READMEs and docs, the CSV to JSON converter reshapes data and the HTML formatter tidies existing markup. CSV vs Excel: what each file really contains, and what breaks in between explains the paste formats.

Frequently asked questions

How do I convert CSV to an HTML table?

Paste the CSV into the import box and press Import. The first row becomes the header if Header row is ticked, and the HTML is ready to copy.

How do I make a table accessible?

Add a caption, put column headers in <th scope="col"> inside <thead>, use <th scope="row"> for row headers, and avoid merged cells where you can.

Can I paste from Excel or Google Sheets?

Yes. Copied cells arrive as tab-separated text, which the importer reads directly.

Is my data saved?

No. Everything runs in your browser and nothing is stored or sent.