About the HTML to Markdown tool
Moving articles from a CMS into a static site, a documentation repository or a note-taking app usually means turning HTML back into Markdown. This tool converts HTML to Markdown while keeping the structure that matters: headings, paragraphs, bold and italic text, links, images, nested lists, blockquotes, code blocks and tables. Inline styles, scripts and layout markup are dropped, leaving clean, portable text that works in any Markdown editor. Check complex tables and embedded media after converting, since Markdown cannot express everything HTML can. To go back to HTML, use Markdown to HTML, and to strip markup completely, the HTML to Text Converter.
The conversion relies on the parser built into your browser and then walks the document tree it produces. As a result, the tool sees the page the way a browser does, including sloppy markup that is technically invalid but still displays. Each familiar piece of a page has a Markdown counterpart, and the converter uses it: headings become hash lines, emphasis becomes asterisks, links and images keep their addresses, lists keep their nesting, quotations get the > marker, and code and tables are rewritten in Markdown syntax as well.
For elements that Markdown has no syntax for, you decide what happens. They can stay as inline HTML, which Markdown allows, or be reduced to their plain text. Scripts, style blocks and HTML comments are removed in both modes, since they serve no purpose in a Markdown document.
How to use the HTML to Markdown tool
- Paste the HTMLUse a whole page or only the part you need.
- Decide on unsupported tagsKeep them as inline HTML or flatten them to text.
- Run ConvertThe Markdown version appears below the input.
- Save the resultCopy it or download it as a .md file.
HTML to Markdown features
- Headings, paragraphs, emphasis and hyperlinks
- Ordered and unordered lists, nested to any depth
- Images carried over with their alternative text and title
- Inline code, plus fenced code blocks that keep the language name
- Regular tables turned into Markdown table syntax
- Unsupported tags kept as HTML or reduced to text
- Scripts, style blocks and comments stripped out
- Copy the Markdown or download it as .md
Common uses
- Migrating an old blog out of WordPress or another CMS into a static site
- Saving a web article as notes in a Markdown app
- Bringing documentation into a Git repository
- Pulling clean, readable text out of a saved web page
- Preparing content for an editor that only accepts Markdown
HTML to Markdown in practice: moving a blog to a static site, cleaning page-builder markup, keeping URLs, images and embeds
Converting HTML to Markdown is the core step in moving content out of a content management system and into a static site, a documentation repository or a notes app. The conversion handles structure; a successful migration also needs attention to metadata, images, embeds and, above all, URLs that already rank in search. This guide migrates a WordPress post to a static site and covers each of these steps.
A worked example: moving a WordPress post
A blogger moving to a static site generator exports each post's HTML content and converts it to Markdown. At the top of each file goes front matter, a short block of settings between lines of three hyphens, such as title: "Best time to visit Swat", date: 2026-03-14 and slug: best-time-to-visit-swat. The body is the converted Markdown. Keeping the slug identical to the old address means the post keeps the same URL after the move.
Cleaning page-builder markup
Pages built with visual builders wrap a few paragraphs of content in dozens of nested containers with generated class names. Converting such a page to Markdown strips the layout clutter and leaves the content itself: headings, paragraphs, lists and links. This is often the easiest way to rescue content from a site being rebuilt.
Keeping URLs and rankings
Pages that already rank in search should keep their addresses where possible. Where an address must change, add a permanent redirect from the old URL to the new one. Keeping a spreadsheet of old and new addresses during a migration, and checking it after launch, protects traffic built up over years.
Images
Converted Markdown points to the original image addresses. Download the images, store them with the new site and update the paths, otherwise images disappear when the old site is switched off. Alt attributes carry over as Markdown image descriptions; images that had no alt text should get proper descriptions now.
Embeds and widgets
Embedded videos, maps and forms have no Markdown equivalent. Keep them as HTML, which most Markdown processors allow, or replace them with the shortcodes or components your new platform provides. Search the converted files for leftover iframe and script tags to make sure none were missed.
Documentation exports
Documents exported from wikis or online editors as HTML can be converted into Markdown for a project repository, where changes are reviewed like code. After converting, fix heading levels, check that code samples landed in code blocks and replace internal links with links to the new file paths.
Saving articles to notes
Notes apps such as Obsidian store pages as Markdown files. Converting a saved web article or your own published post into Markdown keeps it readable, searchable and editable in plain text for years, independent of any one service. Respect copyright, and keep personal copies of other people's work for private reference only.
Clean-up after converting
Read through each converted file. Look for escaped characters such as backslashes before asterisks, lists that restart numbering, headings at the wrong level and very long lines. A quick pass by eye catches problems that are tedious to fix later across hundreds of files.
Tables
Simple tables convert to Markdown tables, but tables with merged cells or multi-row headers cannot be expressed in Markdown's table syntax. Keep complex tables as HTML, or simplify them into one header row and plain cells before converting, which also makes them easier to read on phones.
Common mistakes
- Changing URLs without redirects during a migration.
- Leaving images on the old server.
- Losing embedded videos and forms silently.
- Skipping the clean-up pass after converting.
Related tools
To convert Markdown back into HTML, use Markdown to HTML. To create redirects for changed addresses, try 301 Redirect Generator, and to remove stray characters from converted text, Text Cleaner.
Internal links
Links between posts on the old site often point to full addresses on the old domain or to old URL patterns. After converting, search the Markdown files for the old domain and replace those links with relative paths to the new pages. Otherwise visitors bounce between old and new sites, or reach redirects unnecessarily.
Categories and tags
Category and tag archive pages may also rank in search. Record each post's categories and tags in its front matter so the new site can rebuild the same archives, ideally at the same addresses, and redirect any archive address that has to change.
Testing a sample first
Before converting hundreds of posts, convert five very different ones, such as a post with a gallery, one with a table, one with an embedded video and one with a long list. Problems found in a small sample can be solved once, in the conversion process, instead of being fixed by hand in every file afterwards.
Author and comment data
Comments, author profiles and post statistics are stored separately from post content and are not part of the converted HTML. Export them through the platform's own export tools if you want to keep them, and decide early whether the new site will show comments at all, since that affects how they should be saved.
Privacy
Conversion runs in your browser. The HTML you paste is not uploaded or stored.
Frequently asked questions
What happens to tags that Markdown cannot represent?
That is your choice. Keeping them as inline HTML is valid Markdown and loses nothing, while reducing them to plain text gives a cleaner file that reads well anywhere, at the cost of some of the original structure such as definition lists or underlined text.
Can tables be converted?
Yes. A regular grid of rows and columns becomes pipe-table syntax that most Markdown editors understand. A table that relies on rowspan or colspan cannot be expressed that way, so it is kept as HTML inside the document instead.
Is anything lost in the conversion?
Some things always are, because HTML can describe much more than Markdown. Classes, inline styles, data attributes and complicated nesting have no place to go, while the document structure, usually the part that matters, comes through.
How does it handle code blocks?
Preformatted code turns into a fenced block delimited by three backticks. If the original code tag carried a class such as language-python, that language name is written after the opening fence, so editors and static site generators can still highlight it.
Can I enter a web address instead of pasting HTML?
No. Browsers do not allow a page to read content from other websites, so open the page yourself, copy its source from view-source or the developer tools, and paste that in.
Is the content I paste uploaded?
No. The parsing and the conversion both happen inside your browser, so drafts, internal documentation and private pages never leave your device or appear in anyone's server logs.