CSV to HTML Table Converter

This CSV to HTML table converter turns spreadsheet data into table markup you can paste into a web page. The header row becomes a proper thead, every cell is escaped, and a preview shows the finished table.

Updated
Runs in your browser. Your data is not uploaded.
Cell text is always escaped, so < and & in your data show as text.

How to use the CSV to HTML Table

  1. Paste CSV or upload a .csv file.
  2. Choose whether the first row and first column are headers, and add a caption if you like.
  3. Copy the HTML or download it, and check the preview underneath.

How it works

The CSV is parsed by the RFC 4180 rules. The first row becomes <thead> with <th scope="col"> cells so screen readers announce column names. The rest goes into <tbody>. Characters such as < and & are escaped, so data can never turn into markup.

Examples

  • Name,Age / Ana,34 → a table with <th scope="col">Name</th> in the head and one body row.
  • A cell containing <b> shows as the text <b>, not bold.

Accessible tables

Screen readers rely on header cells to tell users which column a value belongs to. Use a header row, add scope="col" (this tool does), and give the table a caption that says what it shows. Avoid tables for layout; use them only for data with rows and columns.

Limitations

  • Merged cells (colspan and rowspan) are not created.
  • Files up to 5 MB; very large tables are better paginated on the page.

Frequently asked questions

How do I convert CSV to an HTML table?

Paste the CSV, keep "First row is the header" on, and copy the generated table code.

Is the HTML safe to paste into my site?

Yes. Every cell is escaped, so no scripts or tags from the data end up in the markup.

Can I style the table?

Turn on "Add minimal CSS" for borders and stripes, or set a class name and style it with your own CSS.

Often used together with the CSV to HTML Table.