Convert HTML Tables to Markdown Online
- HTML tables convert to GitHub Flavored Markdown (GFM) table syntax
- Works with any standard table — headers, alignment, and rows preserved
- GFM tables work in Obsidian, Notion, GitHub, GitLab, and most Markdown editors
- Paste any HTML containing a table — the converter handles the rest
Table of Contents
HTML tables are verbose — dozens of <tr>, <td>, and <th> tags to represent what is essentially a grid of data. GitHub Flavored Markdown (GFM) table syntax is far more compact and readable, and it works in GitHub, GitLab, Obsidian, Notion, and most modern Markdown editors.
The converter handles the translation automatically — paste the HTML, get GFM table syntax back.
HTML Table Syntax vs. Markdown Table Syntax
A simple three-column HTML table:
<table>
<thead>
<tr>
<th>Name</th>
<th>Price</th>
<th>In Stock</th>
</tr>
</thead>
<tbody>
<tr>
<td>Widget A</td>
<td>$12.99</td>
<td>Yes</td>
</tr>
</tbody>
</table>The same table in GFM Markdown:
| Name | Price | In Stock |
| --- | --- | --- |
| Widget A | $12.99 | Yes |The Markdown version is 80% shorter, human-readable without any rendering, and editable in any text editor without worrying about closing tags. Converting from HTML to Markdown is a one-way simplification — you lose nothing in the table data, only the verbose tag structure.
How to Convert an HTML Table to Markdown
- Get the HTML table. Copy it from the page source, Inspect element, or wherever the table lives. You can paste the full page HTML — the converter handles tables anywhere in the document.
- Paste into the converter input area.
- Click "Convert to Markdown."
- Find your table in the output. If you pasted a full page, the table appears in context with the surrounding content. If you pasted just the <table> element, the entire output is the GFM table.
- Copy the Markdown table and paste it into your destination.
The converter handles <thead>, <tbody>, <th>, and <td> elements. Header rows become the top row with the separator line below (| --- | --- |). Body rows become data rows.
Sell Custom Apparel — We Handle Printing & Free ShippingGitHub Flavored Markdown Table Syntax Explained
GFM table syntax uses pipes (|) to separate columns and hyphens for the separator row between headers and data:
| Header 1 | Header 2 | Header 3 |
| --- | --- | --- |
| Row 1, Col 1 | Row 1, Col 2 | Row 1, Col 3 |
| Row 2, Col 1 | Row 2, Col 2 | Row 2, Col 3 |Alignment — You can align columns by adding colons in the separator row:
| Left | Center | Right |
| :--- | :---: | ---: |
| data | data | data |Cell content — Cells can contain basic Markdown formatting: bold, italic, inline code, and links. They cannot contain multiple paragraphs, images, or block-level elements.
Edge case — Pipe characters (|) inside table cells need to be escaped as \| or the Markdown parser will treat them as a column separator. The converter handles this automatically for HTML tables that contain | in cell content.
Where GFM Markdown Tables Are Supported
GFM table syntax is widely supported across Markdown environments:
- GitHub and GitLab — README files, issues, PR descriptions, wiki pages
- Obsidian — Both source and live preview modes render GFM tables
- Notion — Pasting GFM Markdown with a table creates a Notion table block
- VS Code — With a Markdown preview extension, GFM tables render correctly
- Docusaurus, MkDocs, Jekyll — Most static site generators with Markdown support include GFM table rendering
- Confluence — With the Markdown macro or the Markdown importer
Where GFM tables are NOT supported: standard CommonMark without GFM extensions does not include tables. Some minimal Markdown processors or older systems may render the table as literal pipe-separated text rather than a visual table.
HTML Table Features That Do Not Convert to Markdown
GFM table syntax is intentionally simple. Several HTML table features have no Markdown equivalent:
- Merged cells — colspan and rowspan have no GFM syntax. The converter handles this by duplicating content or leaving cells empty to maintain column count.
- Nested tables — Tables inside table cells produce invalid GFM. The inner table content is flattened to text.
- Table styling — Background colors, borders, cell padding, font sizes — all CSS-defined. GFM tables are unstyled; display depends entirely on the renderer's default table styles.
- Table captions — The <caption> element has no GFM equivalent. Captions are converted to a paragraph above the table.
For simple data tables — the most common case — conversion is clean and complete. For complex layout tables or tables with merged cells, manual cleanup after conversion is usually necessary.
Convert HTML Tables to Markdown
Paste any HTML. GFM table syntax out. Free, no signup, instant.
Open Free HTML to Markdown ConverterFrequently Asked Questions
How do I convert an HTML table to Markdown?
Paste the HTML containing the table into the converter and click Convert. The output includes the table in GitHub Flavored Markdown (GFM) pipe syntax.
Do HTML tables with headers convert correctly?
Yes. <thead> with <th> elements become the header row in GFM table syntax with the separator line below.
What if the table has merged cells (colspan/rowspan)?
Markdown has no equivalent for merged cells. The converter flattens them — content may be duplicated or cells left empty. Manual cleanup is needed for complex merged-cell tables.
Does the Markdown table work in Obsidian and Notion?
Yes. Both Obsidian and Notion support GFM table syntax. Pasting the converted Markdown renders a visual table.

