Skip to main content

CSV to HTML Table

Turn CSV into a clean HTML table in your browser. Proper escaping, optional header row, and styling you can paste straight into a page.

All Data tools →

This tool runs entirely in your browser. Nothing you enter is sent to our servers, so there is nothing for us to store or see.

About the CSV to HTML Table

Paste CSV and get a ready-to-use HTML table back as you type. Everything runs inside this page on your own device, so nothing you paste is uploaded.

Escaping is the part that matters and the part most generators get wrong. A value containing <, & or a quotation mark has to be encoded, or it stops being data and becomes markup — and a CSV column holding something like <script> would then execute on whatever page you pasted the result into. Every cell here is escaped, ampersands first so the encoding cannot be double-applied, which is what produces those stray &amp;lt; sequences you sometimes see in generated markup.

The output is real, semantic table markup: a <thead> with <th scope="col"> cells when your first row is a header, and a <tbody> for the data. That is what makes the table navigable in a screen reader rather than just a grid of text. Ragged rows are padded so every row has the same number of cells, since a short row in HTML leaves a visibly broken table edge.

Three styling choices are offered: bare markup for a page that already has table styles, a bordered version with inline CSS that works anywhere including inside an email, and framework class names for a Bootstrap or Tailwind project. You can also wrap the result in a complete HTML document if you want a standalone file to open directly.

How to use the CSV to HTML Table

  1. Paste your CSV

    Paste into the left pane, or drop a .csv file onto it — dropping reads the file locally and never uploads it.

  2. Say whether the first row is a header

    Leave it ticked to produce a proper thead with th cells, which is what makes the table readable in a screen reader.

  3. Pick your styling

    Bare markup for a styled page, inline borders for anywhere including email, or framework classes for Bootstrap and Tailwind.

  4. Copy or download

    The markup appears on the right as you type. Copy it into your page, or download it as an .html file.

Frequently asked questions

Is my data uploaded anywhere?

No. The conversion runs inside your browser and nothing is sent to a server. You can disconnect from the internet once the page has loaded and the tool will keep working exactly as before.

Are special characters escaped properly?

Yes. Every cell has its ampersands, angle brackets and quotation marks encoded, with ampersands handled first so the escaping cannot be applied twice. That matters for more than tidiness: an unescaped value containing a script tag would run on whatever page you pasted the output into.

Is the markup accessible?

It uses a thead with th scope="col" cells for the header row and a tbody for the data, which is what lets a screen reader announce which column a value belongs to. Without that structure a table is just a grid of text to anybody not looking at it.

What happens to rows with fewer columns than the header?

They are padded with empty cells so every row has the same width. A short row in HTML does not stretch — it leaves a visibly broken edge on the table, so padding is the more useful behaviour even though the original file was ragged.

Can I get a complete HTML file rather than a fragment?

Yes. Tick "Wrap in a full HTML document" and you get a valid standalone file with a doctype, a character set declaration and a viewport meta tag, which you can save and open directly in a browser.