Turning web page copy into Markdown
Paste semantic HTML and get Markdown text that fits a README or a knowledge base better.
Guide
HTML ↔ Markdown offers two-way text format conversion. HTML→Markdown is built on Turndown, fixed to ATX headings, fenced code blocks, the - list marker and * emphasis; Markdown→HTML runs through the GFM mode of marked. Whichever direction you take, the HTML behind the rendered preview passes through DOMPurify, and the final Markdown→HTML output is sanitized HTML as well.
Updated 2026-09-102 min read
.html/.htm/.md/.markdown/.txt file; a manual file import must not exceed 10 MiB.converted.md / converted.html.| Input | Output | Notes |
|---|---|---|
<h1>A</h1> |
# A |
HTML→Markdown |
**bold** |
<p><strong>bold</strong></p> |
GFM Markdown→HTML |
| HTML that contains a script | The preview strips the dangerous parts | DOMPurify sanitization |
breaks: true option is not enabled here; a single ordinary line break can therefore behave differently from the editor preview.File.text(); this is not a binary HTML/Markdown converter, so bytes in the wrong encoding may first be replaced by the browser's text decoding.Paste semantic HTML and get Markdown text that fits a README or a knowledge base better.
Convert GFM Markdown into sanitized HTML before pasting it into a controlled page.
The conversion keeps the meaning of the content rather than the exact structure of DOM, CSS and attributes; complex layouts in particular lose their presentation layer.
<script> tags?No. Both the output and the preview go through DOMPurify, so dangerous elements and attributes are removed.
Input files and text are read, parsed and converted locally in your browser and are never uploaded; what is loaded dynamically is the site's conversion library code, which does not send your prose out as an external request.
Updated 2026-09-10
Convert HTML to Markdown and back (turndown / marked) with sanitized preview; copy or download the result
HTML → Markdown uses turndown (ATX headings, fenced code blocks); Markdown → HTML uses marked (GFM syntax). Both the output and the preview are sanitized with DOMPurify, which removes scripts and dangerous attributes. Complex tables, nested layouts and similar HTML structures may degrade to plain text when converted to Markdown.