HTML to Markdown
Use the CaseSwitch HTML to Markdown Converter to turn simple HTML (headings, paragraphs, lists, links) into Markdown for git-friendly docs. Paste HTML, review the Markdown, and copy it. Conversion runs in this browser via Turndown — nothing is uploaded.
Written by the CaseSwitch editorial team. We maintain these tools in the browser so drafts, keys, and images stay on your device.
Last reviewed: 23 July 2026
Processed locally in your browser. Nothing is sent to a server.
Paste or type text to convert. Output stays empty until there is input.
Character count: 0 · Word count: 0 · Line count: 0
Examples
Heading plus paragraph
Input
<h1>Hello</h1><p>World</p>
Output
Hello ===== World
H2 section
Input
<h2>Section</h2><p>Para</p>
Output
Section ------- Para
Unordered list
Input
<ul><li>a</li><li>b</li></ul>
Output
* a * b
Link in a paragraph
Input
<p>See <a href="https://example.com">link</a>.</p>
Output
See [link](https://example.com).
Bold and italics
Input
<p>Bold <strong>text</strong> and <em>italics</em>.</p>
Output
Bold **text** and _italics_.
How to use
- Paste HTML that contains the document content (not an empty app shell).
- Review headings, lists, and links in the Markdown output.
- Copy into your repo and tidy tables or images by hand if needed.
What this tool is for
Docs often start as HTML exports from a CMS or email. Markdown is easier to diff in git. This converter maps common tags to Markdown equivalents. Complex layout HTML will not become a pixel-perfect article — that is expected for a document format without CSS.
How it works
Turndown walks the HTML and emits Markdown. Headings, paragraphs, lists, emphasis, and links map cleanly. Unsupported or layout-only tags may become plain text or be dropped. Tables and images need a human pass. Script contents should not be pasted in.
When to use it
Moving a CMS export toward a README, turning an email into notes, grabbing a heading structure, and starting a docs PR from HTML you already have.
When not to use it
Not a browser rendering engine. CSS-positioned magazines will look wrong. For .docx use Word to Markdown. For PDFs use PDF to Markdown. Client-rendered SPA roots often have no content in the HTML source.
How it compares to related tools
Markdown Formatter tidies Markdown you already have. HTML Formatter stays in HTML. PDF to Markdown and Word to Markdown are for uploaded documents.
Common mistakes
Converting a whole SPA root `div` and wondering where content went (it was client-rendered). Leaving script contents in the Markdown. Expecting multi-column CSS layouts to survive.
Setext headings from Turndown
Turndown often emits Setext-style H1/H2 (`===` / `---` underlines) for simple heading tags. ATX `#` headings are also fine in Markdown — convert style in your editor if your style guide prefers `#`. The meaning is the same.
Images and layout
You typically get Markdown image syntax pointing at the original `src`. Files are not downloaded. Multi-column CSS and absolute positioning disappear because Markdown is a document format, not a layout engine.
Frequently asked questions
Are images converted?+
You typically get Markdown image syntax pointing at the original src. Image files are not downloaded.
Why did my layout disappear?+
Markdown is a document format, not CSS. Expect structure (headings, lists, links), not pixel-perfect columns.
Why are H1/H2 underlined instead of #?+
Turndown’s default often uses Setext underlines for simple headings. Change to ATX `#` in your editor if you prefer.
Can I convert a whole SPA page?+
Only if the HTML source contains the text. Client-rendered apps often ship an empty root — copy rendered HTML from DevTools if needed.
Is my HTML uploaded?+
No. Conversion runs in this browser.
Does it strip scripts?+
Do not paste script-heavy pages. Review the Markdown and remove any script leftovers before committing.
Does this tool send my payload to CaseSwitch?+
No. Formatting, encoding, and naming conversions for this page run in your browser after load — your sample stays on the device.
Related tools
Markdown Formatter
Cleaning a paste from a chat, unifying a docs snippet, preparing a GitHub issue, and normalizing list style before a PR.
Plain Text Converter
Pasting a README snippet into Slack as plain text, cleaning a CMS export, preparing copy for a system that escapes HTML badly, and getting unstyled words ready for a case converter.
Word to Markdown
Developer docs that started in Word, blog drafts moving to a static site, extracting a policy into a repo, and avoiding upload-based converters for internal handbooks.