HTML table to
Markdown
Convert HTML table markup to clean Markdown table syntax instantly. Perfect for documentation and README files.
Migrating tables from a CMS export?
md0 CMS connects directly to your GitHub repo, so tables like this stay editable in a visual editor instead of living as raw HTML or pipe syntax.
HTML table to markdown
Accepted input
- Paste any <table> HTML.
- Works with tables copied from web pages, email clients, or HTML editors.
- The converter strips inline styles and class attributes.
Output format
- Produces a pipe-delimited markdown table.
- <th> elements become headers; <td> elements become data rows.
Tips
- Empty <td> cells convert to blank cells rather than being skipped, so column counts stay aligned.
- The converter extracts nested tables as flat text.
When to use this tool
Migrating from a CMS
You are moving blog posts or documentation from WordPress, Confluence, or a similar platform to a markdown-based static site. The export gives you HTML files full of <table> tags that your new site cannot render. Paste each table here, copy the pipe syntax, and drop it into your MDX or markdown file.
Writing a GitHub README
You found a comparison table on a website showing API rate limits, feature tiers, or benchmark results and want to include it in your README. Instead of retyping every cell and counting pipe characters, copy the page source, paste the HTML here, and get a clean markdown table in under five seconds.
Documenting an API
Your Swagger or Postman export produced an HTML report with parameter tables, and you need those tables in a markdown-based doc site like Docusaurus or MkDocs. This converter handles the translation, so you do not have to hand-edit pipe syntax for a 20-row table.
How it works
Parsing the HTML
The tool parses your input and locates the outermost <table> element, then walks each <tr> row and reads the <th> or <td> cells in order. It discards inline styles, class names, and HTML attributes, keeping only the text content.
Building the pipe table
The first row of <th> cells becomes the header row. The converter inserts the mandatory separator line (| --- | --- |) required by the CommonMark spec, then renders each subsequent row of <td> cells as a data row with pipe delimiters on both sides.
Limitations
Markdown tables do not support merged cells. If your HTML uses colspan or rowspan, split those cells manually before converting. The converter flattens nested tables to their text content instead of preserving them as sub-tables.
Frequently asked questions
Do I need to include the full HTML page?
No. You only need the <table> element and its contents. Copy the table tag alone from your source code or browser devtools, paste it in, and the converter handles it. Pasting a full HTML document also works, but the converter extracts only the first table.
Does the markdown table work in GitHub?
Yes. GitHub Flavored Markdown (GFM) supports pipe tables, and the output from this tool follows that format exactly. The header row, separator line, and data rows render as a formatted table in any GitHub README, PR description, or issue.
What happens to links and formatting inside cells?
The converter preserves basic inline formatting such as bold (<strong>) and italic (<em>) as markdown syntax where possible. It converts anchor tags (<a href>) to markdown link syntax and simplifies complex nested HTML inside a cell to plain text.
Can I convert multiple tables at once?
The tool processes one table at a time. If you have an HTML file with several tables, copy each one separately and run the conversion for each. For large batches, use a command-line tool like pandoc with a script.
Related tools
Markdown table generator
Build a markdown table from scratch using a grid editor. Useful when you do not have existing HTML to convert.
CSV to markdown table
Convert comma-separated data exported from Excel or Google Sheets directly into a markdown pipe table.
Markdown to HTML
Convert a markdown file to HTML for embedding in a webpage or email template.