Skip to content

Convert an HTML table to Markdown for GitHub, Notion and docs

By Andrii Boiko · 2026-10-23 · 4 min

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

  1. By hand. Fine for a handful of cells.
  2. Through a spreadsheet. Paste into Sheets or Excel, then use an add-on or formula to build the pipes.
  3. Online converters. Paste HTML, copy Markdown — remember that pasting page content into a third-party site shares it with that site.
  4. 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.

Add CleanTable to Chrome — free

Related

Copy your next table the clean way

Free for single tables, no row limit, no account. Pro is a one-time payment.

Add to Chrome — it’s free