What this does
Two converters behind one pair of buttons. Markdown → HTML runs marked; HTML → Markdown runs turndown. Both libraries are pulled in on demand rather than bundled into the page, and both do their work in your browser — a draft you paste in is never sent anywhere. The page opens with a small Markdown sample already converted so you can see the shape of the output before typing.
How do I convert HTML to Markdown?
- Click HTML → Markdown.
- Paste a fragment or a whole document —
<html>and<head>wrappers are fine, they're parsed and dropped. - The Markdown appears below as you type. Copy takes it; Clear empties both boxes.
What Markdown style does the output use?
ATX headings (## Two, not the underlined Setext form), fenced code blocks rather than four-space indentation, and - for bullets. The rest are turndown's defaults: **bold**, _italic_ with underscores, * * * for a horizontal rule, inline links, and <br> as two trailing spaces. A class="language-js" becomes the fence's language tag. Characters that would otherwise read as Markdown get backslash-escaped, so a literal asterisk returns as \*.
<pre><code class="language-js">let x = 1;</code></pre>
→
```js
let x = 1;
``` Why did my HTML table come out as loose lines?
Because turndown's core rules cover headings, paragraphs, lists, blockquotes, links, images, emphasis, code and rules — and nothing else. Tables aren't among them, so the tag is discarded and each cell's text is emitted as its own block: a two-column, one-row table becomes four separate lines. The same flattening hits <del>, <mark> and <sup>, which keep their text but lose their meaning. Wrappers like <div> and <span> vanish cleanly, which is usually what you want. The same rule explains a stranger result: the HTML is parsed into an inert document so nothing executes, but no filter removes <script> or <style>, and their contents fall through as plain text into the middle of your Markdown. Delete those blocks before converting a scraped page, or expect to clean up a stray line of CSS.
Which Markdown flavour does the other direction accept?
GitHub Flavored Markdown, on by default: pipe tables, ~~strikethrough~~, task lists (rendered as disabled checkboxes) and bare-URL autolinking all work. Two things commonly assumed to work don't. Single newlines are not line breaks — breaks is off, so two lines of prose join into one paragraph and you need a blank line or a trailing double space. And footnotes aren't supported; [^1] is parsed as an ordinary reference link, which produces a link with a nonsense target rather than a footnote.
Is the generated HTML safe to publish?
Not without sanitising it. Markdown allows raw HTML and marked passes it through untouched — inline <script> tags and onclick attributes in the input appear verbatim in the output. That's correct behaviour for a converter, but if the Markdown came from a user, run the result through a sanitiser such as DOMPurify before inserting it into a page. Headings also come out without id attributes, so anchor links need adding yourself.
Does a round trip give me back what I started with?
Structurally yes, byte-for-byte no. Anything Markdown can't express — classes, ids, inline styles, tables — is gone after one pass, and whitespace is normalised. Treat it as a content migration, not a lossless transform. To preview rendered Markdown rather than read its HTML, use the Markdown previewer; for entities like &, the HTML entity encoder.