How to convert HTML to Markdown
- Paste your HTML into the left box, or drop a
.htmlfile on it. - The Markdown appears on the right straight away.
- Choose the heading style, bullet marker and code block style at the top if you want a different look, then select Copy or Download.
You can paste a whole page or only a snippet, such as the content of one article.
What the converter does
HTML describes structure with tags, while Markdown uses simple marks in plain text. The converter reads the HTML with your browser’s parser and walks through it: a <h2> becomes ##, <strong> becomes double asterisks, <a href> becomes a link in square brackets and <li> becomes a list item. It uses the Turndown library, which is widely used for exactly this job.
Some things do not have a Markdown form. Inline styles, colours, classes and layout tables are dropped or simplified, because Markdown only describes the structure of the text.
Common uses
- Move a blog post or help article from a CMS into a Git repository of Markdown files.
- Clean up text copied from a web page before pasting it into notes.
- Turn an HTML email into plain readable text.
- Prepare content for a static site generator.
Tips
- Remove navigation, headers and footers from the HTML first. The converter does not know which parts are the main article.
- Check links after converting. Relative links stay relative, so they may need a full address.
- Images become
. Inline images stored as Base64 can be very long; consider saving them as files. - To check the result, paste the Markdown into Markdown to HTML and compare the preview.
- Need to find and replace patterns across the output? Try the regex tester first.
Your HTML never leaves your device, and nothing is stored once you close the page.