Convert an HTML table to Markdown for GitHub, Notion and docs
Markdown tables are the standard way to show a table in a README, an issue, Notion, many documentation tools and AI chats. Here is how to get one from a web page.
Markdown table syntax
| Name | Qty | Price |
|:------|----:|------:|
| Pens | 12 | 3.50 |
| Paper | 5 | 8.00 |
The second line separates the header from the body; colons set alignment (:--- left, ---: right, :---: centre).
Pitfalls
- Pipes inside cells (
|) must be escaped as\|, otherwise they split the cell. - Line breaks inside cells are not allowed in basic Markdown; use
<br>where the renderer supports it. - Merged cells do not exist in Markdown, so they have to be expanded.
- Very wide tables become unreadable in raw text; trim columns first.
Four ways to convert
- By hand. Fine for a handful of cells.
- Through a spreadsheet. Paste into Sheets or Excel, then use an add-on or formula to build the pipes.
- Online converters. Paste HTML, copy Markdown — remember that pasting page content into a third-party site shares it with that site.
- A browser extension. CleanTable copies a table as Markdown straight from the page: right-click → Copy as Markdown, or Alt+Shift+M. Merged cells are expanded, images and link markup dropped, and nothing is uploaded.
Where to paste it
GitHub (README, issues, pull requests), GitLab, Notion, Obsidian, most wikis and static-site generators, and AI assistants such as ChatGPT and Claude.