HTML to Markdown Converter - Clean Markdown from Any Page

Tools / Converters / HTML to Markdown Converter

Convert HTML to Markdown

Scripts, styles and embedded media are dropped; unknown tags keep their text. Tables become GFM tables.

Turning HTML into Markdown

Moving a blog post into a README, a documentation page into a wiki or a web article into your notes means getting rid of the HTML without losing the structure. This converter parses the markup the way a browser does and writes the equivalent Markdown — headings stay headings, nested lists stay nested, tables stay tables — while scripts, styles and tracking pixels disappear.

Steps

  1. 1 Paste the HTML — a whole page or a fragment — into the top box. In most browsers you can right-click a page and choose View source to copy it.
  2. 2 Read the Markdown below; it updates as you type. Nested lists, code blocks with a language and tables with alignment are preserved.
  3. 3 Copy the result or download it as a .md file.

What converts to what

Headings h1 to h6 become hash headings; p becomes a paragraph, br a hard line break and hr a rule. strong and b become double asterisks, em and i single asterisks, del and s double tildes, code becomes backticks and pre a fenced block that keeps a language class as the fence label. Links become [text](url), images ![alt](src); ul and ol become dash and numbered lists with two-space nesting; blockquote becomes lines prefixed with a greater-than sign; table becomes a GFM table with alignment taken from align attributes or text-align styles.

Why it works on the DOM, not on text

Regular expressions cannot handle HTML reliably: tags nest, attributes contain angle brackets inside strings, and real pages are rarely well formed. The converter hands the HTML to the browser's own parser, which repairs unclosed and misnested tags exactly as it would when rendering, and then walks the resulting tree. That is why a link inside bold inside a list item comes out right.

What is dropped and what is kept

script, style, head, noscript, template, iframe, object, embed, svg, canvas, video and audio are removed with their contents — none has a Markdown equivalent and most are noise. Everything else that is not recognised keeps its text: a custom element, a span or a div is treated as a container and its children are converted. Inline formatting inside unknown tags therefore survives.

Escaping and clean output

Characters that would change meaning in Markdown — asterisks, underscores, backticks, backslashes, and a hash or dash at the start of a line — are escaped in text so that converting the Markdown back to HTML gives the same result. Whitespace is collapsed as a browser would collapse it, except inside pre. Blank lines are reduced to one between blocks.

HTML to Markdown - frequently asked questions

Yes. Paste the full source; the head, scripts and styles are dropped automatically and the body content is converted. Navigation menus and footers come through as lists and paragraphs — delete what you do not need.
New
Cooking Converter Convert cups, tablespoons, teaspoons and fluid ounces to grams and ounces for 40 common ingredients — flour, sugar, butter, honey, rice and more — using each ingredient's real density. Runs in your browser.
Popular Today
Word to PDF Convert Word to PDF for free: upload a DOC, DOCX, ODT or RTF file and download a properly formatted PDF in seconds - no registration or watermark.

Related Converters

Word to PDF Convert Word to PDF for free: upload a DOC, DOCX, ODT or RTF file and download a properly formatted PDF in seconds - no registration or watermark.
PDF to Word Convert PDF to Word for free: upload a PDF and download an editable DOCX in seconds - no registration, no watermark and nothing to install.
Image Converter Free image converter: pick PNG, JPG, WebP, GIF or BMP and convert any picture in your browser - your photos are never uploaded to a server.
WebP to PNG Convert WebP to PNG for free: transparency is preserved and the image never leaves your device - the whole conversion runs in your browser.
PNG to JPG Convert PNG to JPG for free: pick the quality and a background colour for transparent areas, all in your browser with no upload.

Other Tools You May Like

MD5 Hash Generator Free MD5 hash generator: turn any text or file into an MD5 checksum in your browser - useful for integrity checks and quick fingerprinting.
Base64 Encoder & Decoder Free Base64 encoder and decoder: convert text or files to Base64 and back, entirely in your browser - nothing is uploaded to a server.
Word Counter Free word counter: paste any text to count words, characters, sentences and paragraphs, and see the estimated reading time - nothing leaves your browser.
Character Counter Free character counter: count characters with and without spaces, plus words and lines, and check SEO limits for titles and meta descriptions.
Keyword Density Checker Free keyword density checker: paste text or a URL to see how often each word and phrase appears, with percentages for one, two and three-word terms.