HTML to Markdown Converter
About this tool
About HTML to Markdown
Move content out of a CMS, an old website, an email newsletter or a rich-text editor into Markdown for a static site, a README, a wiki or notes. Paste HTML or open an .html file and get clean GitHub-flavoured Markdown as you type. Headings become # headings (or underlined ones if you prefer), bold and italic become ** and *, links keep their titles, images keep their alt text, nested bullet and numbered lists are indented correctly, numbered lists keep their start number, checkboxes become task lists, code blocks keep their language from class names such as language-js, block quotes nest, and tables become pipe tables with their column alignment. Characters that would accidentally turn into Markdown syntax are escaped. Scripts, styles, iframes, forms and event handlers are dropped, javascript: links are removed, and the HTML is parsed as text, never loaded into the page, so nothing in it can run or fetch anything. You can keep or drop links, images and tables, and choose - or * bullets.
Built and maintained by Abhi JainUpdated
How to Convert HTML to Markdown
- 1
Paste HTML
Paste HTML into the HTML box or open an .html file. Click Sample to see an example.
- 2
Choose the style
Pick Bullets and Headings, and tick Keep links, Keep images and Pipe tables as needed.
- 3
Copy the Markdown
Copy or Download the Markdown. Paste it into the Markdown Editor to preview it.
HTML to Markdown: questions and answers
Can I convert a whole web page?
Yes: paste the page source (View Source, then copy). Only the <body> is converted, and navigation markup comes through as plain lists, so trim what you don't need.
What happens to HTML that Markdown can't express?
Layout elements such as div and section become plain paragraphs, inline styles and classes are dropped, and colours and fonts are lost, because Markdown has no syntax for them.
Is it safe to paste HTML from an unknown source?
Yes. The HTML is parsed as text by the converter itself and never inserted into the page, so scripts and images in it don't run or load. javascript:, vbscript: and data: links are removed from the output (data: images are kept).
Why are some characters escaped with a backslash?
Characters like *, _, [ and # can start Markdown formatting. A backslash makes sure they appear literally, so "file_name" doesn't turn half the line italic.
Related Tools
- Markdown EditorWrite Markdown with a live, safe preview: GitHub tables, task lists and code blocks. Export Markdown or HTML.
- Markdown FormatterTidy Markdown: consistent bullets and headings, renumbered lists, aligned tables, one blank line between blocks.
- Text CleanerRemove duplicate and empty lines, extra spaces, line breaks, HTML tags, curly quotes and invisible characters in one pass.
- HTML Entity EncoderEscape text to HTML entities (named, decimal or hex) and decode entities back to characters.
- Markdown to PDFTurn Markdown into a styled PDF with selectable text in any language, using your browser's Save as PDF.