HTML to Markdown Converter

Convert HTML to Markdown instantly. Free online converter for migrating content, documentation, and CMS export. Supports p, h1–h6, ul/ol, a, strong, em, code. Input is sanitized before conversion. All processing runs locally.

How it works

When to Use HTML to Markdown

Converting HTML to Markdown is useful when you need to migrate content to a Markdown-based system, export from a CMS or WYSIWYG editor, create documentation from web content, or simplify HTML for version control. Markdown is easier to read and edit as plain text, and many platforms (GitHub, Notion, Obsidian) use it natively.

Limitations

Our converter supports common HTML elements: paragraphs (p), headers (h1–h6), unordered and ordered lists (ul, ol, li), links (a), bold (strong, b), italic (em, i), and code (code, pre). Complex tables, nested structures with many levels, and custom elements may not convert perfectly. Rich text from Word or Google Docs often includes extra markup that may produce verbose Markdown.

Examples

Example 1: Paragraph and Header

Input: <h1>Hello</h1><p>World</p>

Output: # Hello\n\nWorld

Example 2: Bold and List

Input: <p><strong>Bold</strong> text</p><ul><li>Item 1</li><li>Item 2</li></ul>

Output: **Bold** text\n\n- Item 1\n- Item 2

Example 3: Link

Input: <a href="https://example.com">Example</a>

Output: [Example](https://example.com)

Frequently Asked Questions

When is this useful?

When migrating blog posts to a static site generator, exporting from WordPress or similar CMS, converting WYSIWYG output to Markdown for documentation, or preparing content for GitHub README files.

What HTML elements are supported?

We support p, h1–h6, ul, ol, li, a, strong, b, em, i, code, and pre. Tables and some complex structures may have limited support.

Is the input sanitized?

Yes. All HTML input is sanitized with DOMPurify before conversion. Scripts, event handlers, and other dangerous content are removed to prevent XSS attacks.

Is there a size limit?

Yes. Input is limited to 100,000 characters (~100 KB). Larger content may cause performance issues. If you exceed the limit, reduce the input or split it into smaller chunks.

Can I convert rich text from Word or Google Docs?

You can paste HTML exported from Word or Google Docs. The result may include extra formatting. For best results, use clean, simple HTML.