CSV to HTML Table

Paste CSV and get ready-to-use HTML table markup that follows accessibility best practice: a caption, a thead with column headers marked scope="col", optional row headers with scope="row", and every value safely escaped. A live preview shows the result as you type.

Spreadsheet & CSV Runs in your browser

Convert CSV to an HTML Table

Drag and drop a CSV file here, or click to browseCSV or TSV up to 10 MB. Its contents replace the text box.

How to Use the CSV to HTML Table

  1. Paste CSV into the box or choose a CSV file.
  2. Write a short caption that says what the table shows.
  3. Choose whether the first row and/or first column are headers, add a CSS class if your site needs one and choose the indentation.
  4. Copy or download the HTML code; the preview updates as you edit.

About This Tool

Web editors, bloggers and developers who need to publish tabular data in a page or CMS, and accessibility-minded authors who want correct table semantics without hand-coding them.

Input: CSV  ยท  Output: HTML.

Features and Limitations

Features

  • Semantic markup: caption, thead, tbody, th with scope.
  • All values are HTML-escaped, so <, > and & in your data cannot break the page.
  • Optional row headers for tables whose first column labels each row.
  • Choice of indentation or minified output.
  • Live preview that uses the same markup.

Limitations

  • Produces a simple table: merged cells (colspan/rowspan) and multi-level headers are not created.
  • Styling is left to your site's CSS; only an optional class name is added.
  • Line breaks inside a CSV value become <br> tags.
  • Processing happens on your device, so very large files depend on your browser's available memory.

Frequently Asked Questions

Why does the table need a caption?

A caption is the table's title. Screen readers announce it when users reach the table, which helps them decide whether to read it.

What does scope="col" do?

It tells assistive technology that the header cell labels the column below it, so each data cell is read with its column name.

Is it safe to paste data that contains HTML?

Yes. Every value is escaped, so tags in your data are shown as text instead of being interpreted.

Can I style the table?

Add a class name in the options and style that class in your own stylesheet.

Related Tools

More like this: all Spreadsheet & CSV tools, all Files & Documents tools or the TinySandy home page.