HTML from a CMS is a tree. Markdown is a text convention. This page parses the fragment, removes script, style, template, object, embed, iframe, svg, math, noscript, textarea, form, base, link, and meta, then converts what remains. Headings are ATX hashes. Bold is **. Code blocks are fenced. Lists use a hyphen. “<h1>Odd socks</h1><p>In the <strong>dryer</strong>.</p>” becomes a hash line “Odd socks”, a blank line, then “In the **dryer**.”
Links are kept when the address is http, https, mailto, or tel, or a relative path such as /there. A javascript: address is stripped, and the label remains as plain text, so a “bad” link does not survive as a link. An ampersand entity is decoded: “Tea & cake” becomes “Tea & cake” in the heading. Angle brackets in the text are escaped so the Markdown does not turn back into HTML by accident.
“Odd socks in the dryer.” with no tags comes back as that sentence. There is nothing to convert. You do not get a table of contents, and you do not get a live preview. Those are other pages. The conversion is a string you can paste into a Markdown file.
<h1>Odd socks</h1><p>In the <strong>dryer</strong>.</p><script>leak()</script>
# Odd socks In the **dryer**. The script element is gone, including leak(). The bold word is Markdown, not a <strong> tag.
Oddsock runs this in your browser. It is free, it does not upload the work, and it does not ask for an account.
The element is removed before conversion, contents included. leak() does not appear in the Markdown.
http, https, mailto, tel, and relative URLs become Markdown links. A javascript: href is removed and the label is left as text.
As **double asterisks**. Headings use #, code blocks use fences, and unordered lists use hyphens.
“Odd socks in the dryer.” has no tags, so it comes back as that sentence.
No. & becomes & in the text. A raw < in the text is escaped on the way out so it does not look like a tag.