SmartMarkdown

HTML Table to Markdown Table Converter

Paste an HTML <table> — or a whole page containing one — and get a clean GitHub-Flavored Markdown table. Inline formatting, links, images, and alignment attributes are preserved, with a live preview and one-click copy or download.

Paste HTML Table Markup

The first <table> in the markup is converted. Inline tags (b, i, code, a, img) and align attributes are preserved.

Markdown Table Output

Paste HTML containing a table — the Markdown equivalent appears here.

Reviewers

Sarah Chen, SEO Content Strategist

Based on 4 sources
143 people find this tool helpful

What This Tool Does

Copying a table out of a rendered web page, a CMS, or an email and into a Markdown document usually produces a mess of HTML tags. This tool fixes that: it parses the HTML, extracts the table, and rebuilds it as a tidy GitHub-Flavored Markdown pipe table, with a live preview so you can confirm the result before pasting it anywhere.

How to Use It

  1. Paste the HTML — just the <table> block or the full page source.
  2. Read the table that appears, toggling between Markdown and Preview.
  3. Tune alignment per column if you want to override what the source specified.
  4. Copy or download the Markdown.

What Gets Preserved

The converter walks each cell's child nodes and translates inline HTML to Markdown: <strong> and <b> become **bold**, <em> and <i> become *italic*, <code> becomes inline code, anchors become [text](href), and images become ![alt](src). Whitespace is normalized so cells stay compact.

Alignment Mapping

Header-cell alignment is detected from both the legacy align attribute and inline text-align styles, then written into the Markdown separator row using GFM colon syntax. The result renders with the same alignment on GitHub, GitLab, and other GFM-compatible viewers.

Common Use Cases

  • Migrating docs: move tables out of an HTML-based wiki or CMS into a Markdown repo.
  • Scraped data: turn a table copied from a web page into version-controllable Markdown.
  • Email & reports: convert tables pasted from rich-text sources without manual cleanup.
  • Round-tripping: the tool also recognizes an existing Markdown table and re-emits it cleanly.

Tips

  • If a page has multiple tables, paste only the one you want to avoid ambiguity.
  • For tables using colspan/rowspan, review the output — merged cells may leave gaps that need a quick manual fix.
  • Use Preview mode to confirm links and emphasis rendered the way you expect before copying.

FAQ

Frequently Asked Questions