CSV to HTML Table Converter

Convert CSV files into an HTML snippet using <table><tr><td> markup. Choose the delimiter, whether to use the first line as a header, and whether to wrap the rows in <thead>/<tbody>. The result is previewed live and can be copied or downloaded. Conversion runs entirely in your browser; no data is sent to a server.

Delimiter
Use first line as header
Wrap in thead/tbody

Preview

HTML Code


            
            Copied!
            
          

Enter CSV data to see the generated HTML table here.

How a CSV row maps to an HTML table

One CSV row name,age,city
Resulting HTML markup <tr><td>name</td><td>age</td><td>city</td></tr>

When the first line is used as a header, it converts to a row of <th> tags; every row after that converts to a row of <td> tags.

What CSV to HTML table conversion is

Writing a table in HTML means lining up a <tr> for every row and a <td> for every cell, which is laborious by hand. This tool reads a CSV and converts it into an HTML snippet in <table> form. You can preview the result on the spot, so you get to see how it will look at its destination before you copy.

The <, > and & inside cells are turned into HTML entities automatically, so data containing such symbols does not break the display. You can also choose whether to wrap the table in thead and tbody. Semantically it is better to include them, but in environments where interpretation is unreliable — HTML email among them — the minimal form without them is steadier.

How to build an HTML table

  1. Paste in your CSV Paste the CSV into the input field. If you copied it out of spreadsheet software, change the delimiter to tab.
  2. Decide how the header row is handled Turn on the option that treats the first row as a header and that row is output with <th> tags.
  3. Choose whether to include thead and tbody Ordinarily you can leave them on. Turn them off for environments where display is unreliable, such as HTML email.
  4. Check the preview and copy Look at the table as actually rendered, and if it is fine, copy the HTML code and paste it in.

Tips for getting more out of it

  • When pasting into HTML email or an older CMS that lacks Markdown support, the minimal output without thead/tbody tends to be easier to work with.
  • Any <, >, or & inside a cell is automatically escaped into HTML entities, so pasting the generated code will not break the layout.
  • The preview renders the converted table exactly as a browser would, so you can check how it looks before copying the code anywhere.
  • Combine this with the sister tools CSV to Markdown and CSV to JSON to convert a single CSV into whichever of the three formats you need.

When CSV to HTML conversion is useful

Putting a table on a blog or CMS

Even on a CMS with no Markdown support, pasting into the HTML editing mode lets you publish a table.

Putting a table into HTML email

Email does not interpret Markdown, so a table needs HTML. The minimal form with thead and tbody removed is steadier.

Making a mock-up before implementation

At the screen design stage, you can turn a table close to the real data into HTML right away. It also serves for checking how styles apply.

Safely publishing data containing symbols

Values containing angle brackets or ampersands are escaped automatically, so the layout does not break at the destination.

HTML table terms explained

The table element
The HTML tag that represents a table. For its proper purpose — expressing real data with rows and columns — it remains the right tag to this day.
th and td
<th> is a header cell and <td> a data cell. Distinguishing them lets screen readers convey how they correspond.
thead and tbody
Tags that separate the header part from the body part semantically. They also bear on the behaviour of repeating the header when a long table is printed.
HTML entity
A way of writing that displays symbols safely. < is replaced by &lt;, for instance.
Table layout
The old technique of building a page's whole column structure out of table markup. It is now regarded as a clear anti-pattern.

Frequently Asked Questions

It is recommended when possible, since it lets you distinguish the header row from the body semantically. In environments where thead/tbody handling is unreliable, such as some email clients, the minimal markup without them tends to render more consistently.

Yes. Commas and line breaks inside quoted cells are parsed correctly, so even complex CSV data copied from Excel converts into HTML without breaking the table structure.

Yes. The output is standard <table> markup, so it can be pasted directly into a WordPress HTML editing mode or the body of an HTML email.

No. All conversion happens in JavaScript running in your browser, and the CSV content you enter is never transmitted to any server.
Tool-kun

Side Note — Why the <table> tag refuses to die

In the early days of the Web in the late 1990s, "table layout" — building an entire page layout with <table> tags — was the norm. CSS had little layout power at the time, and tables were the only practical way to arrange content into multiple columns, so HTML source code back then was full of <table> elements that had nothing to do with tabular data.

Now that CSS has matured and Flexbox and Grid are widespread, using tables for layout is a well-known anti-pattern. But for the tag's actual purpose — representing real data organized into rows and columns — <table> remains the most appropriate and accessible choice, since screen readers can announce the relationship between <th> and <td> cells.

The need to paste CSV content into a blog post or email newsletter is still common, since HTML email cannot render Markdown and some CMSs lack a Markdown plugin. A tool that converts spreadsheet output into an HTML table with one click supports this simple but enduring practical need.