CSV to HTML Table Converter

Turn CSV into semantic HTML table markup, header row in thead, cells escaped, ready to style with your own CSS.

CSV
HTML
Runs locally in your browser

About the CSV to HTML Table Converter

Publishing a small dataset on a web page usually means an HTML table, and hand-writing one is tedious. This converter parses the CSV and produces a <table> with the header row in <thead> as <th> cells and the data rows in <tbody>. Every cell value is escaped so angle brackets and ampersands display as text.

No classes, ids or inline styles are added. The markup inherits your stylesheet, and you can add a class to the table tag after pasting. Rows are one per line and indented, which keeps the result readable in a template or a pull request.

To see the table rendered rather than as code, paste the result into the HTML Viewer. For Markdown documents, CSV to Markdown produces a pipe table instead.

How to use

  1. Paste or upload the CSV.
  2. Untick the header option if the first row is data.
  3. Copy the table markup into your HTML.

Common questions

Can I add Bootstrap or Tailwind classes?
Add them to the table element after pasting; the converter keeps the markup unstyled on purpose.
Are numbers right-aligned?
Not by the markup. Use a CSS rule such as td:nth-child(n) { text-align: right } for numeric columns.
Does it handle quoted cells with commas?
Yes, the CSV parser follows RFC 4180, so "Cork, Ireland" stays one cell.