HTML Table Generator

Build HTML, Markdown, and CSV tables visually and copy the code with one click.

Developer ToolsFreeNo Signup
HTML Table Generator
Free Tool

How to use HTML Table Generator

Writing table markup by hand is tedious — keeping rows and columns aligned in HTML or Markdown, remembering the pipe syntax, and getting cell spacing right takes time and creates easy-to-miss errors. The Table Generator lets you build tables visually and outputs clean, ready-to-paste code in HTML, Markdown, or CSV format. Building your table: Start by setting the number of rows and columns. A blank table grid appears — click any cell to type content directly into it. Tab moves to the next cell; Shift+Tab goes backward. Press Enter in the last column to add a new row automatically. Add and remove rows and columns: Use the + and − buttons on the edges of the table grid to add or remove rows and columns. New columns insert at the right; new rows append at the bottom. Click and drag column headers to reorder them. Set header row: Toggle the first row as a header row. In the HTML output, the first row uses <th> tags inside a <thead> element. In Markdown output, the header separator row of dashes is inserted automatically. In CSV, the first row simply becomes the first line of the file. HTML customization: For HTML output, set the table width, add a CSS class name, enable or disable borders, and set cell padding. The output uses inline styles by default, or class-based styling if you prefer to handle CSS separately. Output formats: Switch between HTML, Markdown, and CSV using the format tabs. Each updates instantly based on your current table content. Copy the code: Click Copy to copy the complete table code in the selected format. Paste directly into your HTML file, Markdown document, README, spreadsheet, or wherever you need the table. Common uses: HTML documentation tables, README tables in GitHub repositories, blog post comparison tables, simple data presentation, and converting a small dataset from a spreadsheet into embeddable web code.

Frequently Asked Questions

What table formats does the generator output?

Three formats: HTML (using standard table, thead, tbody, tr, th, and td tags), Markdown (using the pipe-and-dash syntax used by GitHub, GitLab, and most Markdown processors), and CSV (plain comma-separated values for spreadsheet import). Switch between them using the format tabs — the table content stays the same, only the output syntax changes.

Can I import existing data into the table builder?

Yes. Paste CSV data into the CSV import field and the table grid fills automatically — each comma-separated column becomes a column, each line becomes a row. You can also paste tab-separated data (TSV) from a spreadsheet copy-paste, which the tool detects and parses correctly.

Does the HTML output use inline styles or CSS classes?

By default, the HTML uses inline styles for borders, padding, and width so the table works immediately without any external CSS. If you prefer class-based styling, enter a class name in the settings panel — the output will add that class to the table element and remove inline styles, letting you control appearance through your own stylesheet.

Can I merge cells (colspan or rowspan) in the generated table?

Basic cell merging is available by selecting a cell and setting its colspan or rowspan value in the cell properties panel. The HTML output correctly adds the colspan and rowspan attributes, and adjacent cells are removed from the output to account for the merge. Markdown does not support cell merging natively, so merged cells fall back to standard output in Markdown mode.

How do I make a sortable table from the generated HTML?

The generated HTML is a static table. To make it sortable, add a JavaScript sorting library like DataTables or Tablesort after your HTML. Link the library script, add the appropriate class or data attribute to your table element, and the library handles click-to-sort on column headers. The generated HTML structure is compatible with both libraries without modification.

Recommended

Related Tools