CSV to HTML Table Converter

Paste CSV data to generate HTML table markup with a proper <thead> and <tbody>, optional inline styling, and a custom CSS class name. You can also paste existing HTML table markup and pull its rows back out as CSV. Both directions run in your browser, with no upload and no server round-trip.

PrivateFreeWorks offline

Reviewed by Vincenzo Manto, Founder & Lead Developer · Last updated September 27, 2026

How it works

  1. 1

    Choose CSV → HTML or HTML → CSV, then paste your data or drop a file.

  2. 2

    For CSV → HTML, pick whether the first row is a header, add inline styles, and optionally set a CSS class name.

  3. 3

    The converted output updates instantly on the right.

  4. 4

    Copy the result or download it as a .html or .csv file.

Why convert CSV to an HTML table?

Spreadsheet exports and database dumps are usually CSV, but publishing data on a web page or in an email newsletter needs real HTML markup. This tool builds a semantically correct table, with a proper header section, in one step, so you can drop it straight into a CMS, static site, or HTML email.

Pulling data back out of an HTML table

Sometimes you have the opposite problem: a table already lives inside a web page or a scraped HTML snippet, and you need it as plain CSV for a spreadsheet. The HTML → CSV direction reads the table's structure directly from the markup, so you don't need to manually copy cell by cell.

Frequently asked questions

Does the HTML output include a header row?

Yes, if you mark the first row as a header it's wrapped in a proper <thead><tr><th>...</th></tr></thead>, with the remaining rows in <tbody>, which is what screen readers and CSS table styling expect.

Can I add my own CSS classes instead of inline styles?

Yes. Turn off inline styles and type a class name, and the tool adds class="your-class" to the generated <table> tag so you can style it with your own stylesheet.

Can it convert an HTML table back into CSV?

Yes, switch to HTML → CSV and paste a table's markup. The tool reads the first <table> element it finds, walks its rows and <th>/<td> cells, strips any nested tags like <b> or <a> down to plain text, and produces a CSV file.

What happens if my HTML has nested tags inside a cell?

Nested tags such as bold, links, or spans are stripped and only the visible text content is kept, so a cell like <td><b>Ada</b> Lovelace</td> becomes the CSV value "Ada Lovelace".

Is my data uploaded anywhere?

No. Both directions of the conversion run in your browser with plain JavaScript, and nothing is sent to a server.

Related tools