Skip to main content

HTML to Markdown converter

Convert HTML code to clean Markdown. Useful for blogs, documentation and content migration.
Conversion
Paste HTML code, load a page from a URL or use the bulk downloader
Skip:
0 characters
HTML to MD
Markdown cheat sheet
Reference for the Markdown syntax elements

Headings

# H1Heading 1
## H2Heading 2
### H3Heading 3
#### H4Heading 4
##### H5Heading 5
###### H6Heading 6

Setext style:

Title
=====
Subtitle
-----

Text formatting

**bold**bold
__bold__bold
*italic*italic
_italic_italic
***both***both
~~strike~~strike
`code`code
==highlighted==highlighted
H~2~OH2O
X^2^X2

Links

[Text](URL)

Inline link

[Text](URL "Title")

Link with title

[Text][1]

Reference link

[1]: URL

Reference definition

<https://...>

Autolink

<email@example.com>

Email link

Images

![Alt](image.jpg)

Insert an image

![Alt](image.jpg "Title")

Image with title

![Alt][img1]

Reference image

[img1]: image.jpg

Image reference

[![Alt](img)](URL)

Linked image

Lists

- Item

Bulleted list (-, *, +)

1. First

Numbered list

- Item - Nested

Nested (2 spaces)

- [ ] Todo

Empty checkbox

- [x] Done

Checked checkbox

Term : Definition

Definition list

Quotes

> Quote

Blockquote

> Line 1 > Line 2

Multiple lines

> Outer >> Nested

Nested

> Text > > - List

With other elements

Code blocks

`inline code`

Inline code

``` code ```

Code block (fenced)

```js code ```

With syntax highlighting

~~~ code ~~~

Tilde variant

code

Indented (4 spaces)

`` `backtick` ``

Escape backticks

Tables

| A | B | |---|---| | 1 | 2 |

Simple table

|:---|

Left aligned

|:---:|

Centered

|---:|

Right aligned

Horizontal rules

---Hyphens
***Asterisks
___Underscores
- - -With spaces

Line breaks

Line␣␣

2 spaces at the end

Line\

Backslash at the end

Line<br>

HTML tag

Paragraph 1 Paragraph 2

Blank line = new paragraph

Escaping

\**
\##
\[[
\``
\\\

Escapable: \ ` * _ {} [ ] ( ) # + - . ! |

Footnotes

Text[^1]

Footnote reference

[^1]: Footnote text

Footnote definition

Text[^note]

Named footnote

[^1]: Line 1 Line 2

Multi-line footnote

IDs and anchors

## Title {#custom-id}

Heading with ID

[Link](#custom-id)

Anchor link

[To H2](#heading)

Auto-generated ID

Comments and metadata

<!-- Comment -->

HTML comment

[//]: # (Comment)

Markdown comment

--- title: Test ---

YAML Frontmatter

Emoji and special characters

:smile:😄
:+1:👍
&copy;©
&rarr;→
&mdash;—

Note: Some extended features (footnotes, task lists, emoji shortcodes, highlight, subscript and superscript) are not available in every Markdown parser. GitHub, GitLab and many modern tools support them.

Converting HTML to Markdown

  1. On the 'HTML' tab, paste your code, use 'Example' for a short sample, or load a page on the 'URL' tab.
  2. Click the convert button. The conversion starts only on click, not while you type.
  3. Under 'Skip' you can leave out links, images, tables, code, quotes and lists.
  4. Copy the Markdown or download it as an .md file.

The line breaks option is preselected. Both fields can be opened in fullscreen, which helps with long documents.

Markdown to HTML, the reverse direction

The switch between the two fields changes the direction. The tool then becomes a Markdown to HTML converter. Input and output swap places, and the download gives you an .html file.

For the syntax, there is a cheat sheet below the converter.

Converting websites and many URLs at once

On the 'URL' tab our server loads the HTML of a page, and then your browser converts it. The server removes scripts, styles, comments and the nav, footer and aside areas, plus the page header (a header with navigation or role='banner'). A header inside an article that holds the headline is kept. Line breaks and indentation in pre blocks are preserved, and other whitespace is collapsed. The tool reads at most 500 KB and waits at most 10 seconds for the page. If the page is larger, the tool converts only the beginning and shows a notice, on the URL tab as well as on the bulk tab (there per URL). The page has to be publicly reachable.

On the 'Bulk' tab you enter up to 50 URLs, one per line. They have to start with http:// or https://, and the tool ignores other lines. All successful pages end up in one shared Markdown file, where each page gets its own section with its source. The list shows the status of each URL, and you can remove single entries.

Setting the Markdown style

Under 'Advanced options' you decide how the Markdown looks. The default settings use the characters below. If you use reference links, the URLs are collected at the end of the document.

  • Headings with # (ATX). Underlined headings (Setext) are available as an alternative.
  • Lists with - and horizontal rules with -. Both can be switched to * or + and _ respectively.
  • Code in fences with backticks, alternatively indented or with ~.
  • Italic with * and bold with **. You can choose _ and __ instead.
  • Links inline in the text, alternatively as references.

Frequently asked questions

Everything about converting HTML to Markdown
What is Markdown?
Markdown is a lightweight markup language that is easy to read and write. It is widely used for README files, documentation, blogs and content management systems. Markdown is converted to HTML but is much easier to read in its source form.
Why should I convert HTML to Markdown?
Markdown is easier to read and edit than HTML. It suits text that will later be output in several formats. Many modern CMSs and static site generators such as Hugo, Jekyll or Next.js use Markdown.
Which HTML elements are supported?
The converter supports the common HTML elements: headings (h1-h6), paragraphs, lists (ul, ol), links, images, bold, italic, code blocks, blockquotes, tables and more.
What happens to unsafe links?
Links with javascript:, data: or other unsafe addresses are not carried over. The link text stays as plain text. Allowed are http, https, mailto, tel, as well as relative addresses and anchors. When you convert Markdown to HTML, images may also use data URLs with PNG, GIF, JPEG or WebP. Links and SVG data URLs stay excluded.
Is the formatting preserved?
The most important formatting is carried over. Complex CSS styles and JavaScript functionality can't be expressed in Markdown, because Markdown is a plain-text markup language.
Is the HTML to Markdown converter free?
Yes. The converter is free and works without sign-up. HTML and Markdown you paste are converted directly in your browser. Only when you enter a URL does our server load that page for you.

Related tools

All tools

Changelog

Latest updates and improvements to the HTML to Markdown converter
v1.6.0

November 20, 2026

Correct tags, safe Markdown links, code stays code

  • • Fixed: the conversion confused tags that start the same way. <br> was treated like <b>, <img> like <i>, <span> like <s>, <picture> like <p> and <abbr> like a link. Now only the exact tag name counts.
  • • Fixed: a very large number of unclosed tags (for example thousands of <i> or <a href>) no longer slows the conversion down.
  • • Markdown to HTML: images may contain data URLs with PNG, GIF, JPEG or WebP. Links and SVG data URLs stay excluded.
  • • Fixed: multi-line text in links, headings and bold text was lost or broke the Markdown. Line breaks inside them now become spaces.
  • • Markdown to HTML: code and inline code are HTML-escaped and no longer evaluated as Markdown.
  • • Markdown to HTML: links are processed before emphasis, and _ or * only count at word boundaries. snake_case, 2*3*4 and addresses no longer get an <em>.
  • • Markdown to HTML: links with javascript:, data: or other unsafe addresses stay as plain text, as in the other direction, and quotation marks in addresses are escaped.
  • • Fixed: multi-line code blocks were wrapped into paragraphs line by line when converting Markdown to HTML.
  • • When you load a URL, line breaks and indentation in pre blocks are preserved, and a header holding an article headline is no longer lost. Only the page header is removed.
  • • Corrected: the conversion does not run in real time but only when you click the convert button.
v1.5.0

November 18, 2026

Complete entities, safe links, stable tables

  • • Named entities such as &auml;, &ouml;, &szlig; and &eacute; are decoded, as are emoji and other characters outside the basic alphabet (&#128512;).
  • • Entities are decoded only once, so &amp;lt; becomes &lt; as text.
  • • A vertical bar in a table cell is escaped and no longer breaks the table.
  • • Links with javascript:, data: or other unsafe addresses are removed. The link text stays.
  • • Angle brackets in code blocks are preserved.
v1.4.0

November 17, 2026

Notice for large pages

  • • Added a notice when a page loaded by URL was larger than 500 KB and only the beginning was converted, also per URL in bulk mode.
  • • Added a guide with instructions and use cases directly below the tool.
  • • Added related tools at the end of the page.
Show older versions
v1.3.0

December 9, 2025

Two-way conversion

  • • Added the reverse direction: convert Markdown to HTML.
  • • Added one-click switching between the modes.
  • • Input and output are swapped automatically.
  • • Download formats follow the direction (.md / .html).
v1.2.0

December 9, 2025

Bulk download and advanced options

  • • Added a bulk URL downloader for up to 50 URLs.
  • • Added advanced Markdown style options (CommonMark).
  • • Added a fullscreen mode for both panels.
  • • Made the interface more compact.
  • • Made the layout wider for a better overview.
v1.1.0

December 9, 2025

More features

  • • Added conversion options (skip links, images, tables and more).
  • • Added URL to Markdown: load HTML directly from a website.
  • • Added a Markdown preview.
  • • Added a Markdown cheat sheet.
v1.0.0

December 8, 2025

Launch

  • • HTML to Markdown conversion.
  • • Support for the common HTML elements.
  • • Conversion on a click of the convert button.
  • • Copy and download.
  • • Client-side processing.