tooly

Convert HTML to Markdown online

Paste HTML from a page, a CMS export or an email and get tidy Markdown for your README, wiki or notes — scripts and styles dropped, tables kept.

Everything runs in your browser — nothing is sent anywhere

How to use

  1. 1

    Paste your HTML into the box.

  2. 2

    The Markdown appears below as you type.

  3. 3

    Copy it or download a .md file.

Typical reasons to go from HTML to Markdown

HTML is how content is published; Markdown is how a lot of it is written and stored. Converting between them comes up when moving a blog from WordPress or another CMS to a static site generator such as Hugo, Jekyll or Astro, when copying documentation from an old intranet page into a Git-based wiki, when saving an article into a notes app like Obsidian, or when preparing web content as clean input for a script or a search index. Markdown keeps the meaningful structure, the headings, emphasis, links and lists, and drops the presentational markup that makes HTML hard to read and edit.

What each element turns into

The conversion runs as you type and follows a fixed set of conventions, chosen to match what most Markdown tools expect:

  • <h1> to <h6> become # to ###### headings.
  • <strong> and <b> become **bold**; <em> and <i> become _italic_.
  • <a href> becomes [text](url), keeping a title attribute if there is one. Links without an href become plain text.
  • <img> becomes ![alt](src). The image file itself is not touched, so the link points wherever the original src did.
  • <ul> lists use - as the bullet, and <ol> lists are numbered.
  • <pre><code> becomes a fenced code block between triple backticks. A class such as language-python on the code element is kept as the fence's language tag, so syntax highlighting still works.
  • <blockquote> becomes lines starting with >, and <hr> becomes * * *.
  • <br> becomes two trailing spaces and a line break, Markdown's way of writing a hard break.

Elements with no Markdown meaning, such as <div>, <span> and <section>, are unwrapped: their text stays and the tags go. <script>, <style>, <noscript> and <iframe> are removed with everything inside them, which takes care of tracking code, embedded widgets and inline CSS.

Characters that get a backslash

You may notice backslashes in the output that were not in the page, such as 1\. Introduction or \*important\*. This is escaping, and it is correct. If a paragraph in the HTML starts with "1." followed by a space, writing it bare in Markdown would turn it into a numbered list. Literal asterisks, underscores, square brackets and a # at the start of a line are escaped for the same reason, so that the rendered Markdown shows exactly the text the HTML showed.

Getting a clean result from a full web page

The converter does not guess which part of a page is the article. Navigation menus, cookie banners, sidebars and footers are ordinary HTML text, so pasting a whole page source brings all of them along. For a clean result, give it only the content you want:

  1. Open the page in your browser and right-click the first line of the article, then choose Inspect.
  2. In the developer tools, find the element that wraps the whole article, often <article> or <main>.
  3. Right-click it, choose Copy, then Copy outerHTML, and paste that here.

A few other things to keep in mind:

  • Relative links stay relative. A link like /blog/post-2 or an image src="img/photo.jpg" is converted as written. If the Markdown will live on a different site, replace them with full URLs.
  • Email HTML converts poorly. Newsletters are built from nested layout tables, and every <table> is converted into a Markdown table. The result is a single table with whole sections of text crammed into cells. Copy the inner content of one cell instead of the whole email.
  • Tables are text-only. Each cell is reduced to its plain text, so links and formatting inside cells are lost, and the first row always becomes the header row.
  • HTML comments are dropped.

Checking the output

The quickest way to confirm a conversion is to render it back. Paste the Markdown into Markdown to HTML and look at the preview: headings, lists and code blocks should match the original page structure. If you are converting a Word file rather than a web page, use DOCX to Markdown, which applies the same rules but reads the .docx directly. Nothing you paste here is uploaded; the HTML is parsed and converted by your browser.

FAQ

Which elements are supported?

Headings, paragraphs, bold and italic, links, images, blockquotes, ordered and unordered lists, code blocks and tables.

What happens to scripts and styles?

They are stripped, along with their contents — only readable content survives.

Are tables converted?

Yes, into GitHub-flavoured Markdown tables. Merged cells are flattened, since Markdown has no equivalent.

Is my HTML uploaded?

No. The conversion runs in your browser.

Can I convert Markdown back to HTML?

Yes — use Convert Markdown to HTML.

Related tools