HTML to Markdown
To convert HTML to Markdown, paste your HTML and copy the Markdown that appears beside it — <h2>Pack list</h2> becomes ## Pack list, <strong> becomes **bold** and links become [text](url). This HTML to Markdown converter runs Turndown locally in your browser, so nothing is uploaded. It is a drafting helper, not an HTML sanitizer.
Updated
Paste HTML and convert it locally to Markdown for drafts and notes. Closing the tab drops the workspace; we do not write it to localStorage or send it to a remote converter API. This page is the inverse of Markdown to HTML on this hub — HTML in, Markdown out — not a full site crawler and not an XSS sanitizer for untrusted CMS paste.
Conversion runs in the browser. Common tags map to Markdown headings, emphasis, links, lists, code, and blockquotes. Scripts, styles, and event attributes are stripped from the conversion path rather than turned into Markdown. Broken or incomplete HTML may still produce imperfect Markdown — fix the source HTML and paste again.
Paste an HTML fragment or small document. Conversion stays in this tab; remote URLs are not fetched.
Review the draft before publishing; layout-heavy HTML can be lossy.
Drafting helper only. Scripts, styles, and inline event handlers are removed before conversion, but this is not a security sanitizer for untrusted CMS HTML. Closing the tab drops the paste.
How does the HTML to Markdown work?
1. Paste HTML
Drop in an HTML fragment or small document. Load example fills a fictional Chennai notes sample.
2. Convert locally
The browser strips script/style/event handlers from a temporary DOM, then Turndown maps common tags to Markdown. Nothing is uploaded.
3. Review the Markdown
Headings, emphasis, links, lists, code, and blockquotes are the focus. Layout-heavy tables and CSS-dependent structure may be lossy.
4. Copy the result
Copy the Markdown for drafts. Closing the tab drops the workspace. Need the other direction? Use Markdown to HTML on this hub.
Questions about HTML to Markdown
- What does this HTML to Markdown converter do?
- It turns HTML markup into Markdown in your browser. Paste an HTML fragment or small document, and it maps common tags — headings, paragraphs, emphasis, links, lists, code, and blockquotes — into Markdown you can copy into a draft. It is a local drafting helper, not a full website importer.
- Does it upload my HTML?
- No. Conversion runs entirely in this tab. There is no account, no server-side converter, and no file upload. The text you paste stays here until you clear it or close the page. We do not write it to localStorage. That is the same privacy rule as Markdown to HTML and HTML Encode on this hub.
- How is this different from Markdown to HTML on this hub?
- Markdown to HTML converts Markdown into HTML with `marked`. This page converts HTML into Markdown with Turndown — the inverse direction. They are separate URLs on purpose. Use Markdown to HTML when you start from Markdown; use this page when you start from HTML.
- Will complex HTML round-trip perfectly?
- Not always. Nested layouts, wide tables, and CSS-dependent structure are often lossy in HTML→Markdown. The page focuses on common drafting tags. If the Markdown looks wrong, simplify the HTML (or clean it in a text editor) and paste again.
- Does it sanitize untrusted HTML for a CMS?
- No. Before conversion it strips `script`, `style`, and inline event-handler attributes so the converter is not asked to turn those into Markdown, but that is a drafting convenience — not a security sanitizer for untrusted CMS paste. Do not treat the output as safe HTML to re-inject into a site.
- Can I paste a full webpage URL and have it fetched?
- No. Paste the HTML text itself. This page does not crawl or fetch remote URLs. That keeps your paste local and avoids turning the tool into a proxy.
- How do I convert HTML to Markdown in JavaScript or from the command line?
- In JavaScript, install the library this page uses with npm install turndown, then call new TurndownService({ headingStyle: "atx" }).turndown(html) on an HTML string; it works in Node and in the browser. From the command line, Pandoc converts a saved file: pandoc -f html -t gfm page.html -o page.md. For a one-off paste, this page does the Turndown step without installing anything.
- Is there a separate /html-to-md/ or /markdown-converter/ URL?
- No. One canonical address with a trailing slash: /text-utilities/html-to-markdown/. Support queries like "markdown converter" can land here; we do not publish stub duplicate slugs.
- Is this a word counter?
- No. Page Utils does not publish a word-counter URL. This tool rewrites HTML into Markdown; it does not count words, characters, or reading time.
What else can I open?
- URL EncodeEncode or decode URL percent-encoding in your browser. Query-safe text — no signup.
- Number to WordsConvert a number to English words in your browser. Copy the wording — no signup.
- Markdown to PDFConvert Markdown to a clean PDF in your browser.
- JWT Token GeneratorCreate and sign a compact HS256 JWT locally in the browser.
- Markdown PreviewLive Markdown preview in a sandboxed iframe in the browser.
- HTML EncodeEncode or decode HTML entities in your browser. Escape < & and friends — no signup.
These tools run in your browser. Page Utils does not store, upload, or write to localStorage the keys, tokens, or text you paste. Results are a convenience aid, not legal, tax, or security advice.