PicoToolkit
Extracted data:
View Settings
Applies to real TAB characters.
0 characters
0 without spaces
0 words
0 lines
IndexValue
No matching items found
Spotted a bug or have an idea for a new feature? Let us know here »

CSV to HTML Converter

Streamline CSV or TSV into clean HTML tables with PicoToolkit

Streamline CSV or TSV into clean HTML tables with PicoToolkit

Convert CSV or TSV data into minimal, copyable HTML tables. Paste your data, choose separators and formatting options, convert, then copy the produced HTML into your page or CMS.

How to use

  • Paste your CSV/TSV into the input area (copy & paste only — no file upload).
  • Select the column separator (comma, semicolon, pipe, space, tab).
  • Toggle “Header in first row” to treat the first row as a header (outputs <thead> with <th> when enabled).
  • Pick pretty-printing: None (compact), Tab, 2 spaces, or 4 spaces — controls indentation and newlines in the output.
  • Choose tag behavior: output only <tr>/<td> or include <thead>/<th> and <tbody> (user decides via the header checkbox and tag options).
  • Click Convert and use the Copy button to take the HTML to your clipboard.
  • screen

Conversion rules (what to expect)

  • If “Header in first row” is checked, the first CSV row is placed into <thead> and its cells become <th> elements; otherwise all rows become <tr> with <td>.
  • Separator selection determines how columns are split (comma, tab, semicolon, pipe, space). Choose the value that matches your file.
  • Quoted fields are preserved as single cell values (commas inside quotes do not split cells).
  • Empty CSV cells produce empty table cells in HTML.
  • Pretty-print controls only formatting (indentation and line breaks) of the resulting HTML; it does not change table structure or content.
  • Tag options let you include or omit semantic wrappers (<thead>, <tbody>, <th>) depending on your target usage.

Why PicoToolkit HTML is better

The two images below contrast typical WYSIWYG/spreadsheet HTML exports and the clean HTML produced by PicoToolkit. They illustrate the practical advantages of minimal, semantic markup.

messy spreadsheet html clean html

  • Messy export (left): spreadsheets and WYSIWYG editors often add inline styles, classes and unnecessary attributes that bloat HTML and complicate styling.
  • PicoToolkit output (right): only semantic table tags are included (<table>, <thead>, <tbody>, <tr>, <th>, <td>). No inline styles or extra attributes.
  • Benefits: smaller payloads, easier global styling via CSS, simpler maintenance, and fewer accessibility surprises.
  • Practical result: paste-ready HTML you can style or inject into templates without manual cleanup.

Examples (copyable)

1) Basic CSV with header → <thead> + pretty print (2 spaces)

Input CSV:
name,age,city
Alice,30,Seattle
Bob,25,Portland

Output HTML (pretty, 2 spaces):
<table>
  <thead>
    <tr>
      <th>name</th>
      <th>age</th>
      <th>city</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Alice</td>
      <td>30</td>
      <td>Seattle</td>
    </tr>
    <tr>
      <td>Bob</td>
      <td>25</td>
      <td>Portland</td>
    </tr>
  </tbody>
</table>

2) Quoted field with commas (compact output)

Input CSV:
id,desc
1,"Big, large, expensive"
2,"Small, cheap"

Output HTML (compact):
<table><tr><th>id</th><th>desc</th></tr><tr><td>1</td><td>Big, large, expensive</td></tr><tr><td>2</td><td>Small, cheap</td></tr></table>

3) TSV example (tab separator)

Input TSV:
product	price	stock
Pen	1.20	100
Notebook	2.50	50

Output HTML (pretty, tab):
<table>
	<thead>
		<tr>
			<th>product</th>
			<th>price</th>
			<th>stock</th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td>Pen</td>
			<td>1.20</td>
			<td>100</td>
		</tr>
	</tbody>
</table>

html

clean html

Common use cases

  • Embed results or reports into a blog or CMS with minimal HTML cleanup.
  • Convert exported spreadsheet data into lightweight tables for documentation.
  • Generate copy-paste-ready HTML for email templates, static pages, or demos.

Tips & edge cases

  • If your CSV contains a header row and you want semantic markup, enable “Header in first row” to get <thead> and <th>.
  • Choose the exact separator used in your source file—incorrect separators cause misaligned columns.
  • For compact embedding (no extra whitespace), choose “No” pretty print. For readable source, choose 2 or 4 spaces or Tab.
  • If you want the table to include classes or inline styles, convert first and then add classes manually—this tool produces clean HTML without extra styles.

Related tools

FAQ

Can I upload a file?

No — the converter works via copy & paste into the input area only.

Does the tool preserve header rows?

Yes. Enable the “Header in first row” checkbox to get a <thead> block and <th> cells. If disabled, the header row becomes a normal <tr> with <td>.

How are quoted fields handled?

Quoted fields are treated as single cell values; embedded separators inside quotes do not split the column.

Can I get a compact output for embedding?

Yes — choose “No” in pretty-printing to produce compact HTML with minimal whitespace suitable for embedding in templates.

PicoToolkit evolves fast. Stay ahead.

Get early access to new tools, features, and productivity upgrades.

We email you occasionally. You can unsubscribe anytime.
© PicoToolkit 2022-2026 All rights reserved. Before using this website read and accept terms of use and privacy policy. Icons by Icons8