Skip to content

Convert an HTML table to Markdown

Paste an HTML <table> and get clean GFM Markdown, with align attributes carried into the separator row and nested markup reduced to text.

  • Runs in your browser
  • Files are never uploaded
  • Free, no account
HTML table to Markdown
Paste an HTML <table> — copied from a page, an email or a CMS — and get clean Markdown, with the align attributes carried over into the separator row.
Edit the grid
Every cell is a real input, so this works from the keyboard: Tab moves across, Shift+Tab moves back. Click a column header's alignment button to cycle left, centre and right.
Editable table grid
Row actions
Rows
4
Columns
3
Cells filled
3
Output
Switch format at any time — the grid above is the single source of truth.
Your table never leaves this tab — check it yourself—

Starting the network probe…

The counter above wraps fetch, XMLHttpRequest and navigator.sendBeacon in this tab and counts every call. It does not block anything — it just reports.

Two ways to verify independently

  1. Turn off Wi-Fi or enable airplane mode, then use the tool. It keeps working, because the page is already fully loaded.
  2. Open your browser devtools, switch to the Network tab, clear it, and run the tool. No new row appears.

Why this matters

In 2025 researchers found that popular online formatters had retained tens of thousands of user-submitted snippets — JSONFormatter.org and CodeBeautify together exposed roughly 80,000 saved documents, many containing live cloud credentials, private keys and internal database connection strings, because “format this” quietly meant “upload this”. A separate incident exposed roughly 3.5 million user PDFs on a document-conversion service. The only structural fix is not sending the data in the first place: this site is served under a Content-Security-Policy whose connect-src contains no third-party origin, so a request off this device cannot be made even by accident.

Getting the HTML in the first place

Paste the markup, not the rendered table. In Chrome, Firefox or Safari: right-click the table, choose Inspect, find the <table> element in the DOM panel, right-click it and choose Copy → Copy outerHTML. In VS Code or a CMS, just select the source.

If you select the table visually and press Ctrl+C, most browsers put tab-separated text on the clipboard rather than HTML. That is fine — paste it into CSV to Markdown instead, which detects tabs automatically.

How the conversion works

The markup is parsed with the browser’s own HTML parser, so malformed tables, missing <tbody> and unclosed <td> tags are all handled the way a browser handles them. Every <tr> becomes a row and every <th> or <td> becomes a cell, in document order. The first row’s align attributes become the Markdown alignment markers.

Cell contents are reduced to their text. Runs of whitespace collapse to a single space, which is what a browser does when rendering, so a cell whose source is spread across four indented lines becomes one clean value.

What cannot survive

HTML featureWhy it cannot convertWhat happens
colspan / rowspanGFM tables are strictly rectangular; no Markdown table format supports merged cellsThe cell occupies one column and the rest of the row shifts — check the grid
Nested tablesA cell cannot contain a block elementFlattened to the inner table’s text
Lists inside a cellSame reasonFlattened to text; add <br> by hand if you need breaks
Bold, links, images inside a cellThese are expressible in Markdown, but reconstructing them reliably is a different jobReduced to text; re-add the syntax in the grid
CSS-based alignmentNot present in the markupDefaults to left; set it in the grid
<caption>GFM tables have no captionDropped — add a heading or a sentence above the table

The documentation-migration case

Most people arrive here mid-migration: a Confluence, SharePoint, WordPress or Notion page is becoming a Markdown file in a repository. Tables are the part that does not survive an automated export cleanly, and a spec table with forty rows is not something to retype.

A workflow that holds up: convert one table, check the column count against the original, fix any merged-cell damage in the grid, then copy. Doing them one at a time is slower per table and much faster overall than discovering three pages later that every table with a merged header is misaligned.

Content that should not be uploaded

Internal wiki tables are exactly the sort of thing people paste into a converter without thinking: staff lists, salary bands, server inventories, incident timelines. The parse here happens in your tab using the browser’s own parser. Expand the panel under the tool to see the live count of network requests the page has made.

Questions

What exactly should I paste?

The HTML source of the table, starting at `<table>`. In a browser, right-click the table, choose Inspect, then copy the outer HTML of the `<table>` node. A visual copy-paste of the rendered table usually arrives as tab-separated text — which the CSV route handles instead.

What happens to formatting inside cells?

It is flattened to text. Bold, links and spans inside a cell become their plain text content, and runs of whitespace collapse to a single space. Markdown tables cannot contain block elements, so a nested list or a second table cannot survive the trip.

Are colspan and rowspan supported?

No, and no Markdown table format supports them either — GFM tables are strictly rectangular. A merged cell becomes a single cell in its own column and the rest of the row shifts, so check the grid before exporting.

Does it keep the alignment?

Yes, when it is expressed as an `align` attribute on the header cells. Alignment set in CSS cannot be read from the markup alone, so set those columns manually in the grid.