glunty

CSV to HTML Table Converter

Convert CSV or TSV into an HTML table. Handles quoted fields, with a live preview. Local only.

Live preview

What this tool does

Parses CSV (comma, tab, or semicolon delimited) into rows and columns using the RFC 4180 quoting rules, then builds an HTML table. A field wrapped in double quotes can hold commas, line breaks, and quotes, and a doubled quote ("") is read as one literal quote. With First row is header on, the first row becomes a <thead> of <th> cells and the remaining rows become <tbody> rows of <td> cells. Everything runs locally; nothing is uploaded.

How to use it

Paste your CSV. Auto-detect picks the most common delimiter from the first line, or you can choose one from the dropdown. Toggle First row is header to match your data, keep Escape HTML in cells on so characters like <, >, and & become entities, and use Add CSS class when you want a class="csv-table" hook for styling. The generated markup appears in the output box, and a live preview renders the same table below it. Press Copy HTML to grab the source.

Common use cases

  • Dropping a small spreadsheet selection into a web page, email, or CMS as a real table.
  • Turning an exported report into static HTML for documentation or a wiki.
  • Building table fixtures for tests or design mockups without hand-writing tags.
  • Pasting data into a rich-text editor that accepts HTML but not CSV.
  • Generating a styleable table skeleton, then wiring your own CSS to the class.

Common pitfalls

  • Escaping off renders your markup. When Escape HTML in cells is unchecked, any HTML in a cell is emitted verbatim and the preview will render it. Leave escaping on for plain data so stray < or & characters do not break the table.
  • Auto-detect can misfire. A quoted comma in the first line can fool delimiter detection. If the columns look wrong, set the delimiter explicitly from the dropdown.
  • Unterminated quotes are an error. A field that opens a double quote but never closes it is malformed CSV. The tool stops and shows an inline error instead of guessing where the field ends.
  • Ragged rows get padded. If some rows have fewer fields than the widest row, the missing cells are filled with empty <td> cells so every row has the same column count.

Frequently asked questions

How do I convert CSV to an HTML table?
Paste your CSV into the input box. The tool parses it with RFC 4180 rules, then builds a <table> element: with the header toggle on, the first row becomes a <thead> of <th> cells and every other row becomes a <tr> of <td> cells inside the <tbody>. Copy the generated HTML source, or read the live preview to confirm the layout before you paste it into your page.
How does the tool handle commas and quotes inside a field?
It follows the CSV quoting convention from RFC 4180. A field wrapped in double quotes can contain literal commas, line breaks, and quote characters, and a doubled quote ("") is read as one literal quote. So the row "Smith, Jane",42 parses into exactly two cells, not three. If your data uses a different escape scheme, pre-process it first.
What does the HTML-escape option do?
With HTML escaping on (the default), the characters &, <, and > inside a cell become the entities &amp;, &lt;, and &gt; so the text shows literally instead of being read as markup. Turn it off only when your cells already contain HTML you want to render, such as links or bold text. Leaving it on is the safe choice for plain data.
Can I turn off the header row?
Yes. Uncheck "First row is header" and the tool treats every row as data: it emits only a <tbody> with <tr> and <td> cells and no <thead> or <th> at all. Use this when your CSV has no header line, or when you plan to add your own header markup by hand afterward.
Which delimiters are supported?
Comma, tab, and semicolon. Auto-detect counts each candidate in the first line and picks the most frequent, which handles most comma files and tab-separated exports without any change. If a quoted comma in the header throws the guess off, pick the delimiter explicitly from the dropdown.
Is my CSV uploaded to a server?
No. Parsing and HTML generation run entirely in your browser with plain JavaScript, so nothing is sent anywhere. You can paste sensitive spreadsheet exports without them leaving your machine, and you can verify it in DevTools under the Network tab: there are zero requests during conversion.

Embed this tool

Free for any use; attribution appreciated. Paste this on your site:

The embed runs the same tool that lives at this URL. No tracking; no ads inside the embed. Resize height as needed for your layout.

Cite this tool

For academic, journalistic, or technical references. Pick a format:

Citations use 2026 as the publication year. Access date is left as a fillable placeholder where the citation style expects one.

Embedded tool from glunty.com