HTML → Markdown 변환기
Converters & FormattersHTML 조각과 글을 깨끗한 Markdown으로 변환해요. 제목, 강조, 링크, 이미지, 목록, 인용, 코드 블록을 지원해요. 모두 브라우저에서 로컬로 처리되며 공유 링크도 만들어 줘요.
(문서는 영어)
What it does
Converts HTML into clean Markdown: headings, paragraphs, bold/italic/strikethrough, inline code, links (with optional titles), images, ordered and unordered lists with nesting, block quotes, horizontal rules and fenced code blocks (language detected from class="language-…"). It is forgiving by design: unclosed tags auto-close, stray closing tags are ignored, unknown tags pass their content through, and HTML entities are decoded. Literal Markdown characters in your text (*, _, [, ], `) are backslash-escaped so they cannot masquerade as formatting. Everything runs locally in your browser — no DOM needed, the parser is hand-rolled.
How to use it
- Paste HTML into HTML (left), or tap a chip — Fragment, Lists, Rich article. Sample loads a full article; Clear empties the box.
- The Markdown appears live in Markdown output (right).
- Copy takes the document.
- Copy share link encodes your input in the URL.
Examples
Inline marks:
<p>Some <strong>bold</strong> and <em>italic</em> with a <a href="https://x.dev">link</a>.</p> → Some **bold** and *italic* with a [link](https://x.dev).
Nested list:
<ul><li>a<ul><li>b</li></ul></li></ul> → - a + newline + - b
Code with a language:
<pre><code class="language-js">const a = 1;</code></pre> → a ```js fence.
Escaping: <p>3 * 4 [x]</p> → 3 \* 4 \[x\] — the characters survive as text.
How the conversion works
The parser builds a tree first (strings, comments and tags are told apart in one scan), then renders blocks — headings, quotes, lists, fences get blank-line separation, while inline marks nest inside. Two deliberate rules keep the output honest:
| Input | Behavior |
|---|---|
Unclosed <p>a at EOF |
auto-closed, converted |
Stray </b> with no opener |
ignored |
<span>, unknown tags |
transparent — children converted |
<h3> with text after it in one chunk |
heading, then the text as a paragraph |
Empty <strong></strong> |
renders as nothing (empty emphasis is invalid Markdown) |
< with no closing > |
the one error: “Unclosed tag” |
For the other direction, use Markdown to HTML Converter.