Convert

Convert HTML pages and fragments to clean Markdown

Convert HTML documents and fragments into clean, readable Markdown.

🛡️ Your rows never leave your browser.
Why Onfyt: HTML elements are converted to GitHub Flavoured Markdown pipe tables, not just dropped as raw HTML.

Interactive Sample Data

idhtml
1<h2>DataFix Features</h2><ul><li><strong>Remove duplicates</strong></li></ul>
2<p>Visit <a href="https://datafix.io">DataFix</a> for free tools.</p>
3<table><tr><th>Tool</th><th>Category</th></tr><tr><td>CSV to JSON</td><td>Convert</td></tr></table>

How this tool works

CMS platforms, email clients, and web scrapers all produce HTML. When you need to work with that content in a Markdown-based system (GitHub READMEs, Notion, Ghost, Obsidian, documentation sites), re-typing the whole document by hand is not an option. This tool converts standard HTML to CommonMark-compatible Markdown: - Heading tags (`<h1>` through `<h6>`) → # through ###### - <strong> and <b> → **bold** - <em> and <i> → *italic* - <a href="url"> → [text](url) - <img src="…" alt="…"> → ![alt](src) - <ul><li> → unordered list (- item) - <ol><li> → ordered list (1. item) - <pre><code> → fenced code block - <code> (inline) → `inline code` - <blockquote> → > blockquote - <hr> → --- - <table> → GFM pipe table - <del> → ~~strikethrough~~ Elements with no Markdown equivalent (<div>, <span>, <section>, <article>) have their tags removed and their inner text preserved as plain text. This is intentional — Markdown is a plain-text format and does not have a container element concept. All conversion runs inside your browser tab — no server upload.

Things that usually go wrong

  • JavaScript-rendered content (content added by scripts) is not present in pasted HTML source — copy the rendered DOM from your browser's DevTools instead.
  • Complex CSS-layout structures (
    …) have no Markdown equivalent — their tags are stripped and the text flows inline.
  • SVG and canvas elements are removed entirely — Markdown has no equivalent representation.

Edge cases we tested

🧪 Nested HTML (bold inside a link: text)

Converted to [**text**](url) — nesting preserved correctly.

🧪 HTML with inline styles (

text

)

Style attribute discarded; text content preserved as a Markdown paragraph.

🧪 Malformed HTML (unclosed tag)

Parser tolerates unclosed tags; converts what it can and preserves remaining text.

🧪 HTML comment ()

Removed from the Markdown output.

🧪 Empty HTML input

Returns empty Markdown output, not an error.

Frequently Asked Questions

Will it convert a full HTML page including the section?

The is ignored — meta tags, scripts, and style sheets have no Markdown equivalent. Only the content is converted.

What happens to inline CSS and class attributes?

They are discarded. Markdown has no styling system — only content is preserved.

Can I convert back to HTML?

Use the 'Markdown to HTML' tool — the reverse conversion.

Does it handle HTML entities (&, <,  )?

Yes — HTML entities are decoded to their plain-text equivalents before conversion.

Related tools

Convert

Markdown to HTML

Convert Markdown documents to clean, semantic HTML in your browser.

Open Tool →
Clean

Remove HTML Tags from Cells

Strip HTML markup tags and decode HTML entities from product descriptions, CMS exports, and scraped text.

Open Tool →
Format

Find and Replace Text

Replace any word, phrase, or regex pattern in any block of text.

Open Tool →
Validate

Text Diff Checker

Compare two versions of a text document and highlight additions, deletions, and changes.

Open Tool →