About HTML to Markdown
The HTML to Markdown converter turns HTML into clean Markdown — useful for migrating blog posts and CMS content to a Markdown-based system, converting content copied from a web page into personal notes, or preparing documentation for a Git repository from an HTML source.
It comes up constantly during platform migrations: moving posts out of WordPress or another CMS into a static site generator like Hugo, Jekyll or Astro that expects Markdown source files; clipping an article's HTML into a note-taking app without dragging along inline styles and tracking scripts; and cleaning up the HTML a rich-text editor produces so it can be stored as Markdown in a database or version-controlled alongside code. Because it's a genuine html to markdown converter rather than a set of regex replacements, it copes correctly with nested formatting — bold text inside a list item inside a blockquote, for instance — that a naive find-and-replace approach breaks on.
It parses the HTML with a real DOM parser rather than pattern-matching tags, then walks the resulting tree to convert headings, paragraphs, bold and italic text, links, images, ordered and unordered lists, blockquotes, inline code and fenced code blocks into their Markdown equivalents. Layout elements with no Markdown equivalent — div, span and similar wrappers — are unwrapped so their text content survives while the tag itself is dropped, and script and style tags are removed entirely rather than converted, so tracking code and CSS never leak into the output.
For best results, paste just the article or main-content HTML rather than an entire page including header, navigation and footer markup — the converter will still process a full page, but the Markdown output will include navigation link lists and footer boilerplate you probably don't want mixed in with the article body.
How to Use the HTML to Markdown
- Paste HTML into the input pane (a fragment or a whole page body).
- Read the converted Markdown in the output pane.
- Copy it into your Markdown editor, wiki or repository.
Features
- Real DOM-based parsing, not regex hacks
- Headings, lists, links, images, quotes and code blocks
- Strips scripts, styles and other non-content markup
- Instant, client-side conversion
Examples
Converting a heading and link
Input
<h2>About</h2><p>Visit <a href="https://example.com">our site</a>.</p>
Output
## About Visit [our site](https://example.com).
Converting a bulleted list
Input
<ul><li>Fast</li><li>Free</li></ul>
Output
- Fast - Free
Stripping tracking scripts
Input
<p>Hello</p><script>track()</script>
Output
Hello
Frequently Asked Questions
What happens to tags that have no Markdown equivalent?
Layout elements like div and span are unwrapped — their text content is kept, the tags are dropped. Scripts and styles are removed entirely.
Can I convert a full webpage?
Yes — paste the page's HTML and the converter extracts the content. For best results, paste just the article or main-content portion rather than headers, navigation and footers.
Will inline styles or class names carry over?
No — only structural and semantic meaning converts (this is bold, this is a link, this is a heading). Inline styles, class names and other presentational HTML attributes are dropped, since Markdown has no equivalent for them and keeping them would defeat the point of converting to plain-text-friendly Markdown.
Is the HTML to Markdown converter free?
Yes, the HTML to Markdown converter is completely free with no usage limits. No signup, no account and no installation required.
Is my data safe?
Yes. All processing happens locally in your browser using JavaScript — nothing you type is uploaded or stored on our servers.
Related Tools
Markdown Preview
Write Markdown and see the rendered result live — headings, lists, links, code blocks and more. Free online Markdown previewer.
HTML Entity Encoder
Encode special characters as HTML entities or decode entities back to text. Handles named, decimal and hex entities.
Text to Slug
Turn any title into a clean, SEO-friendly URL slug — lowercase, hyphenated and free of accents or special characters.
Word Counter
Count words, characters, sentences and paragraphs in real time. Free online word counter for essays, tweets and SEO content.
Text Diff
Compare two texts and highlight the differences line by line. Free online diff checker — runs entirely in your browser.
HTML Formatter / Minifier
Beautify HTML into readable, indented markup or minify it to shrink file size. Free online HTML formatter, no upload required.