CSV to HTML table Converter
Generate clean, accessible HTML table markup from CSV — a proper <thead> and <tbody>, header cells with scope="col", an optional caption and class, and every value escaped.
CSV to HTML table Converter
Runs in your browser — nothing you enter is uploaded or stored.
Scratchpad auto-saved
How it works — in four simple steps
No signup and nothing to install — it all runs in your browser.
Add your CSV
Paste it into the left box, press Open file, or drag a .csv file onto it. Sample loads a realistic example.
Set the options
Adjust the options above the boxes — the output updates instantly as you change them.
Check the result
Read the status line: it reports rows, keys and any value that couldn't be represented in HTML table.
Copy or download
Copy the HTML table or download it as a .html file. Nothing was uploaded at any point.
Wrap wide tables in a div with overflow-x:auto so they scroll on phones.
Features
Delimiter auto-detection
Comma, semicolon, tab or pipe is sniffed from the first lines — European Excel exports with ; just work.
Header row or not
Use the first row as field names, or treat every row as data with generated column1, column2… names.
Accessible markup
Header cells get scope="col", and you can add a <caption> and a CSS class for styling.
Readable or compact
Padded columns that line up in a code editor, or compact output for the smallest diff.
Private by design
Parsing and conversion run in your browser with JavaScript — your data is never uploaded, logged or stored.
About the CSV to HTML table Converter
Putting a spreadsheet on a web page, in an email template or in a CMS that accepts HTML means writing table markup by hand — or pasting from Excel and getting kilobytes of inline styles. This generator produces the minimal, semantic version: <table>, an optional <caption>, a <thead> with <th scope="col"> for each header and a <tbody> of <td> rows.
Semantic markup matters for accessibility: screen readers use th with scope to announce which column a cell belongs to, and the caption to describe the table. All cell content is HTML-escaped (<, >, &, quotes), so data containing angle brackets can't break your page or inject markup.
Add a CSS class to hook into your framework's table styles — table table-striped for Bootstrap, or your own — and tick Compact for single-line markup to paste into an email builder.
Examples
A price list with a caption, a Bootstrap class and a value containing an ampersand and angle brackets.
Plan,Monthly,Annual,Includes
Starter,₹299,"₹2,990",1 site & email support
Growth,₹799,"₹7,990","5 sites, <API> access"
Scale,"₹1,999","₹19,990",Unlimited sites<table class="table table-striped">
<caption>Hosting plans</caption>
<thead>
<tr>
<th scope="col">Plan</th>
<th scope="col">Monthly</th>
<th scope="col">Annual</th>
<th scope="col">Includes</th>
</tr>
</thead>
<tbody>
<tr>
<td>Starter</td>
<td>₹299</td>
<td>₹2,990</td>
<td>1 site & email support</td>
</tr>
<tr>
<td>Growth</td>
<td>₹799</td>
<td>₹7,990</td>
<td>5 sites, <API> access</td>
</tr>
<tr>
<td>Scale</td>
<td>₹1,999</td>
<td>₹19,990</td>
<td>Unlimited sites</td>
</tr>
</tbody>
</table>This output was produced by the converter on this page with caption “Hosting plans” and class table table-striped — load it with the “Price list” preset above and change any option to see the effect.
How CSV maps to HTML table
| In CSV | Becomes in HTML table |
|---|---|
| Header row | <thead><tr><th scope="col">… |
| Data rows | <tbody><tr><td>… |
| Caption box | <caption>…</caption> |
| CSS class box | <table class="…"> |
<b> in data | <b> (shown as text) |
| Empty cell | <td></td> |
Things that trip people up
- HTML in your data is escaped. That's deliberate and safe. If you want links or bold inside cells, edit the generated markup afterwards.
- No styling included. The table is unstyled on purpose; add a class or a few CSS rules (border-collapse, padding) in your site's stylesheet.
- Wide tables on phones. Wrap the table in a
<div style="overflow-x:auto">so it scrolls horizontally instead of breaking your layout. - Email clients. Many email clients ignore stylesheets; use Compact output and inline styles from your email builder.
CSV vs HTML table at a glance
| Property | CSV | HTML table |
|---|---|---|
| Specification | RFC 4180 (2005) | HTML Living Standard (WHATWG) |
| File extension | .csv | .html |
| Media type | text/csv | text/html |
| Data types | text only — every cell is a string | text (any inline HTML) |
| Comments | No | Yes <!-- --> |
| Nesting | None (flat rows) | Cells can span rows/columns |
- CSV: Fields containing a comma, a double quote or a line break must be wrapped in double quotes, and a quote inside is written twice ("").
- HTML table: Use
for header cells and a so screen readers can announce the table properly. Frequently asked questions
5 answersHow do I convert CSV to an HTML table?
Paste the CSV, optionally add a caption and class, and copy the generated markup into your page or CMS.Is the generated table accessible?
Yes. It uses thead/tbody, th with scope="col" and an optional caption, which screen readers rely on to announce headers.Can I style it with Bootstrap or Tailwind?
Yes — put the classes in the CSS class box, e.g. table table-striped for Bootstrap; for Tailwind add utility classes in your own CSS.Is my data safe to embed?
All values are HTML-escaped, so characters like < and & can't break the page or inject markup.Is my data uploaded anywhere?
No. The CSV is parsed and converted by JavaScript in your browser tab; nothing is sent to a server, so it is safe for internal exports, customer lists and configuration files with secrets.esc↑↓ navigate↵ openesc closeMy deck
Stored only in this browser.