CSV to HTML Table Converter
CV-10Paste CSV and get a clean HTML table to paste into a page. The first row becomes the header, and every cell is escaped so markup in your data shows as text.
Runs in your browser. Nothing is uploaded.
CSV
HTML
How to use it
- Paste your CSV into the input box, or open a .csv file (up to 5 MB) or drop it on the box.
- Leave Delimiter on Auto, or choose one. Untick First row is header (th) if there is no header.
- Choose 2 spaces, 4 spaces or Tab for the indent.
- Copy the HTML or download it as an .html file.
What the HTML looks like
The output is a plain <table> with a <thead> for the header row and a <tbody> for the rest. Header cells are <th scope="col">, which helps screen readers connect each cell to its column. There is no CSS, class or ID, so your own stylesheet controls how it looks. The output is the table only, not a full page with <html> and <body> tags.
Escaping and line breaks
Every cell is escaped, so & < > and both kinds of quote are written as entities. A cell that contains <b>bold</b> is shown as that text and is not run as markup, which also keeps scripts in your data from running. A line break inside a cell is written as <br>, because HTML collapses plain line breaks. If you want real markup in a cell, edit it in the output after converting.
Without a header row
If you untick First row is header (th), the output has no <thead> and every CSV row becomes a row of <td> cells in the <tbody>. A row with fewer cells than the widest row is padded with empty cells so the table stays rectangular. Parsing follows the CSV standard, so quoted fields can hold commas, quotes and line breaks. Values are not trimmed or converted.
Error messages and what to do
| Message | What it means | Fix |
|---|---|---|
A quoted field is never closed (missing closing ") | A field starts with a double quote, but the text ends before the closing quote, so the parser cannot tell where the field stops. | Add the missing closing quote, or double any quote that belongs inside the text, as in "". |
No rows found in the CSV. | The input has no rows after blank lines are removed. | Paste the CSV data. |
Questions people ask
How do I convert CSV to an HTML table?
Paste the CSV into the input box. The converter returns a <table> with the first row in <thead> as header cells and the other rows in <tbody>. Copy it into your page. Nothing is uploaded; it all runs in your browser.
Is the HTML safe if my CSV contains tags or scripts?
Every cell is escaped, so a cell holding <script> or <b>text</b> is written as plain text entities and is not run when the table is displayed. The & < > and quote characters all become entities.
Does it add CSS or classes to the table?
No. The output has no style, class or ID, only table, thead, tbody, tr, th and td elements. Style it with your own CSS, or add a class to the opening <table> tag after you paste it.
How do I make a table without a header row?
Untick First row is header (th). The output then has no <thead>, and every CSV row becomes a row of <td> cells in the <tbody>. Nothing is made up, so the first row is treated as data like the others.
What happens to line breaks inside a cell?
A line break in a quoted CSV field is written as <br>, because HTML would otherwise collapse it into a space. The rest of the cell text is kept as it was.
Does it output a full HTML page?
No, only the <table> element, so you can paste it into an existing page or template. Wrap it in your own <html> and <body> if you need a standalone file.
About this tool
Output is a plain <table> with <thead> and <tbody>, header cells as <th scope="col">, and no CSS, classes or IDs; style it in your own page. Every cell is HTML-escaped (& < > " and '), so markup in your data shows as text and is not run. A line break inside a cell becomes <br>. If you turn off First row is header, there is no <thead> and every row is a body row. Short rows are padded with empty cells. It outputs the table fragment only, not a whole page.