Free HTML to Markdown Converter
Convert HTML to clean Markdown with GFM tables, task lists and strikethrough. Choose heading, list, code and link styles, preview, then copy or save.
Loading tool…
How to convert HTML to Markdown
Convert HTML to clean GitHub-flavoured Markdown with headings, lists, links, code and tables, after removing unsafe markup.
- Paste HTML into the HTML box, or select Open .html to load a file (up to 4 MB).
- Choose heading style, bullet character, code block style and fence, link style, and italic and bold markers.
- Keep GitHub Flavored Markdown ticked for tables, ~~strikethrough~~ and [x] task lists.
- Check the Markdown tab, or switch to Preview to see it rendered.
- Copy the Markdown or download it as a .md file named after your source file.
When to convert HTML to Markdown
Markdown is the writing format of README files, wikis, static site generators, documentation tools, note apps and many content systems. HTML is what you get when you copy from a web page, export from a rich text editor or open an old site's source. Converting by hand means retyping every heading marker, list bullet and link, and tables are especially slow.
Typical jobs include moving blog posts from an old CMS to a Markdown-based site, turning product documentation into a repository README, cleaning up HTML email templates into notes, and preparing web content for tools that work best with plain text. The converter handles the structure and leaves you to review the wording.
Worked example: release notes with a table and checklist
The built-in sample is a short release note of 748 characters of HTML with a heading, a paragraph with bold, italic, a deleted word and a link, a two-item checklist, a table, a code block and a quote. With the default settings it becomes 407 characters of Markdown. The h1 becomes # Release notes, the del element becomes ~~three~~, and the checked box becomes - [x] Update the changelog.
The table header Platform and Size (MB) becomes a pipe table, and because the size cells carry align="right", the separator row reads | --- | ---: |, which right-aligns that column when rendered. The code block keeps its language, since class="language-bash" turns into a ```bash fence. Switch Links to Reference and a paragraph with two links ends with [1]: and [2]: lines listing the URLs, keeping the text itself short.
How the conversion works
First the pasted HTML is cleaned with DOMPurify, which removes scripts, event handler attributes and other unsafe markup; the note under the input counts what was removed. The cleaned HTML is then converted by Turndown, an open-source HTML to Markdown library loaded only when this page needs it, using the options you chose.
GitHub Flavored Markdown features are added by this tool's own rules. Strikethrough comes from del, s and strike elements. Checkboxes inside list items become [ ] or [x]. Tables are rebuilt row by row: each cell is converted on its own, line breaks inside a cell become spaces because pipe tables cannot span lines, pipes are escaped as \|, and colspan is padded with empty cells. If a table has no th header row, its first row is used as the header, because GFM tables require one. The preview renders the Markdown back to HTML with a Markdown parser and sanitizes it again.
Common mistakes
Copying a whole web page brings navigation, footers and hidden elements with it. Copy only the main content, or delete the extra parts from the HTML before converting. Expect layout to disappear: columns, colours, fonts and CSS classes have no Markdown equivalent.
Complex tables are another trap. Merged cells, nested tables and multi-paragraph cells cannot be represented in pipe tables, so check them in the preview and simplify them, or keep that table as raw HTML if your Markdown platform allows it. Finally, image links are converted as Markdown image syntax but the images themselves are not downloaded, so relative paths may need fixing in the new location.
Useful tips and limitations
- Copy only the article part of a web page; menus, footers and cookie banners convert too if they are in the HTML.
- Use reference-style links for long URLs so paragraphs stay readable in plain text.
- Choose ATX headings (#) for maximum compatibility; Setext underlines only exist for the first two heading levels.
- If your platform does not support GFM, untick it so tables and task lists are not turned into syntax the platform will show as plain text.
Common questions
Does HTML to Markdown keep CSS styles and colours?
No. Markdown only describes structure: headings, emphasis, lists, links, images, code, quotes and tables. Layout, fonts and colours are dropped.
What happens to tables with merged cells?
Markdown tables cannot merge cells. A cell with colspan is followed by empty cells so columns stay aligned, and rowspan is not reproduced.
Is it safe to paste HTML from unknown sites?
Yes. The HTML is sanitized with DOMPurify before conversion, so scripts and event handlers are removed, and the preview is sanitized again. Nothing is uploaded.
Can I convert a web page by its URL?
No. The tool does not fetch pages. Open the page, copy its HTML or save it as an .html file, then paste or open it here.
Are images kept?
Image tags become  Markdown with the original address. The image files themselves are not downloaded or embedded.
What is the difference from Markdown Preview?
Markdown Preview turns Markdown into HTML. This tool does the reverse, turning HTML into Markdown.
Everything runs in your browser. Nothing you type is uploaded or stored by ToolWorld Online; copy or download what you want to keep before leaving the page.
