HTML to Markdown Converter
Convert an HTML snippet into clean Markdown. Handles headings, bold/italic, links, images, ordered and unordered lists, blockquotes, inline code and code blocks, tables, horizontal rules and line breaks. Runs entirely in your browser.
Input
Output
Guides
What this tool does
The HTML to Markdown Converter takes an HTML snippet and rewrites it as clean, readable Markdown. Paste the source of a web page, a rich-text export, a CMS field, or an email template, and get back Markdown you can drop into a README, a static-site post, a wiki, or a chat message. The conversion happens entirely in your browser — nothing is uploaded to a server.
It understands the tags that carry meaning in most documents:
- Headings
<h1>–<h6>become#through###### <strong>/<b>become**bold**and<em>/<i>become*italic*<a href>becomes an inline[text](url)link and<img src alt>becomes<ul>/<ol>with<li>become-(or*/+) and1.lists, including nested lists<blockquote>becomes> quotedlines- Inline
<code>becomes`code`and<pre><code>becomes a fenced```block <hr>becomes---,<br>becomes a line break, and<table>becomes a Markdown pipe table<del>/<s>become~~strikethrough~~
Common HTML entities (&, <, >, ", ', ) and numeric entities are decoded back to plain characters.
How to use it
- Paste your HTML into the HTML Input box (or click Try an example).
- Adjust the options if you like: heading style (ATX
#or Setext underline), code-block style (fenced or 4-space indented), the bullet-list marker, and whether<br>tags become hard line breaks. - The Markdown Output updates automatically. Copy it or download it as an
.mdfile.
Frequently asked questions
Does it run on the server? No. The converter is a pure, in-browser transform, so your content never leaves your machine. It is also available through the API for automation.
Which tags are supported?
See the list above. Structural wrappers like <div>, <span>, <section> and <article> are unwrapped and their contents kept. <script>, <style>, <head> and HTML comments are stripped.
Are there any limitations?
The parser is a lightweight, hand-rolled tokenizer aimed at reasonable, well-formed HTML. A bare < immediately followed by a letter inside text (for example a<b) can be mistaken for a tag — encode it as <, which valid HTML already does. Links are emitted in inline style only. Deeply malformed or unclosed markup is recovered heuristically and may convert imperfectly.
Why is my table not aligning? Cells are padded to a minimum width for readability, but very wide cells still produce a valid Markdown table that renderers will align on their own.
Privacy
This tool works entirely client-side. Your HTML is processed in your browser and is never sent anywhere.