CSV to HTML Table Converter
Paste rows from a CSV file or straight from a spreadsheet and get tidy HTML table code with a header row, escaped text and scope attributes for screen readers. Use it to put a price list, opening times, a size chart or a comparison onto a website without typing every cell by hand.
What you enter
- CSV data
- Separator
- First row is the header
- Table class (optional)
How it works
- Paste your data. Cells copied from Excel or Google Sheets arrive separated by tabs, so choose Tab; a saved .csv file usually uses commas.
- Leave 'First row is the header' ticked if the first line holds column names. They become th cells inside thead.
- Add a class name if your site styles tables with one, such as 'price-table'.
- Copy the HTML into your page or download it. Rows that are shorter than the longest one are padded with empty cells so columns line up.
Why header cells and scope matter
A screen reader announces a table cell together with its column heading, so a listener hears 'Price, $5' instead of a bare '$5'. That only works when headings are marked as th cells. The scope="col" attribute removes any doubt about whether a heading belongs to a column or a row, which matters most in tables with several header cells.
Putting the header row in thead and the rest in tbody also helps when printing: many browsers repeat the thead row at the top of each printed page when a long table breaks across pages.
Choosing the right separator
CSV means comma separated, but the separator varies. Spreadsheets in countries that write decimals with a comma, such as Germany or Brazil, usually export with semicolons so that 2,50 stays one value. Copying from a spreadsheet produces tabs. If the result shows everything in one column, the separator setting is wrong for your data.
When a table looks shifted by one column on some rows, look for an unquoted separator inside a value, such as an address with a comma in it. Wrap that value in double quotes in the source, or re-export the file, and convert again.
Tips
- Values that contain the separator, such as 'Bread, rye' in a comma file, must be wrapped in double quotes in the CSV. Spreadsheet exports do this automatically.
- Keep tables for data that really has rows and columns. Using a table to lay out a page makes it hard to read on phones and for screen readers.
- Add a short sentence or caption above the table saying what it shows. It helps visitors and search engines understand the numbers.
- Wide tables overflow on phones. Wrap the table in a div styled with overflow-x: auto so it scrolls sideways instead of breaking the page.
Frequently asked questions
How do I convert CSV to an HTML table?
Paste the CSV, pick the separator and copy the code. Each line becomes a tr row and each value a td cell; with the header option the first line becomes th cells with scope="col". For example 'Item,Price' then 'Soup,$5' gives a table with the headings Item and Price and one row: Soup, $5.
Can I paste directly from Excel or Google Sheets?
Yes. Copying cells puts them on the clipboard separated by tabs. Choose Tab as the separator and paste.
What about commas and quotes inside values?
The converter follows the common CSV rules: a value in double quotes can contain the separator and line breaks, and a double quote inside it is written as two double quotes. "Say ""hi""" becomes Say "hi".
Is the text escaped?
Yes. Characters such as <, > and & are turned into HTML entities, so a cell that reads '<5 kg' shows as text instead of breaking the page.
Is my data uploaded?
No. The table is built in your browser and nothing you paste is sent anywhere.
Related: CSV to JSON converter, HTML table generator, JSON to HTML table converter.
Start for free or see all free tools. We.Inc is free to start, with no card needed. AI building is on paid plans from $20 a month.
More in Free Tools
- CSV to JSON Converter
- Cubic Bezier Easing Generator
- Customer Feedback Form Generator With a Question Bank
- Design Prompt Generator
- Free Digital Business Card Maker
- Free Digital Catalog Maker with a WhatsApp Order Button on Every Product
- Discount Code Generator: Unique Codes in Bulk
- Free DNS Lookup
Product
Who It's For
- For Agencies
- For Freelancers
- For Hosting Providers
- For SaaS Platforms
- For Startups
- For Financial Services
- For Healthcare
Features
Resources
- Blog
- Help Center
- Free Business Tools
- Free UI Components
- Website Templates
- Template Collections
- Website Examples
- Guides
- Comparisons
- Alternatives
- Best Lists
- Reviews
- Pricing Guides
- Use Cases
- Glossary & Guides
- Integrations
- Developers
- Benchmark
- Windows App