HTML to Markdown Converter

Convert HTML to clean, readable Markdown instantly. Supports headings, lists, links, images, code blocks, tables, task lists, and more. Free, private, and 100% client-side.

HTML Input

0 characters ยท 0 words

Fetch from URL

Markdown Output

0 characters ยท 0 words ยท 1 lines

What is HTML to Markdown Conversion?

HTML to Markdown conversion transforms web markup โ€” the language browsers use to render pages โ€” into a clean, human-readable plain-text format. Where HTML uses verbose tags like <h1>Title</h1>, Markdown expresses the same structure as # Title.

The result is content that's far easier to edit, version-control, and port across platforms โ€” from static site generators and documentation tools to AI assistants and content management systems.

HTML (Before)

<h2>Getting Started</h2>
<p>Install the <strong>package</strong> with:</p>
<pre><code>npm install my-pkg</code></pre>
<ul>
  <li>Fast</li>
  <li>Lightweight</li>
</ul>

Markdown (After)

## Getting Started

Install the **package** with:

```
npm install my-pkg
```

- Fast
- Lightweight

How Do I Convert HTML to Markdown?

Using this tool takes less than a minute:

1

Paste or Upload

Paste HTML into the input panel, drop an .html file, or fetch a URL.

2

Configure Options

Set heading style, bullet character, GFM support, and more in the Options panel.

3

Preview Instantly

See real-time Markdown output in Raw or rendered Preview mode.

4

Copy or Download

Copy to clipboard or download the .md file for immediate use.

Why Use Markdown Instead of HTML?

Human-Readable

Markdown is designed to look clean as plain text. You can read and understand it without a browser or editor.

LLM & AI Friendly

Large language models (LLMs) process Markdown much more efficiently than raw HTML โ€” fewer tokens, better semantic preservation.

Version Control

Markdown diffs are meaningful in Git. Track what changed between versions rather than seeing a wall of HTML attribute changes.

Universal Portability

Markdown works everywhere: GitHub, Notion, Obsidian, Ghost, Docusaurus, Gatsby, Next.js MDX, and hundreds more tools.

Faster to Write

No closing tags, no attribute syntax. Writing `**bold**` is faster than `<strong>bold</strong>` every time you format.

Separation of Concerns

Content (Markdown) is separated from presentation (CSS/HTML). Change the design without touching the content.

Supported HTML Elements

This converter handles a comprehensive set of HTML elements common in web content, blog posts, and documentation:

HTML ElementMarkdown OutputNotes
<h1>โ€“<h6># to ###### (ATX) or === / --- (Setext)Configurable style
<p>Double newline separationParagraphs preserved
<strong>, <b>**bold text**
<em>, <i>*italic text*
<a href>[link text](url)Title attribute included
<img src alt>![alt text](src)Title attribute included
<ul><li>- item (configurable)Nested lists supported
<ol><li>1. itemStart attribute respected
<blockquote>> quoteMulti-line supported
<pre><code>```lang\ncode\n```Language auto-detected from class
<code>`inline code`Inline only
<hr>---
<br>Two spaces + newline or \Configurable
<table> (GFM)Pipe table with | separatorAlignment detection from align attr
<del>, <s> (GFM)~~strikethrough~~Requires GFM enabled
<input type="checkbox"> (GFM)- [ ] / - [x]Task lists in <li> items

GitHub Flavored Markdown (GFM) Features

GitHub Flavored Markdown (GFM) extends standard Markdown with features essential for software documentation and collaboration. This tool supports all major GFM extensions, togglable from the Options panel:

๐Ÿ“Š Tables

HTML <table> elements become aligned pipe tables with | separators. Column alignment is auto-detected from the align HTML attribute.

| Name | Age |
|------|-----|
| John | 30  |

~~Strikethrough~~

<del>, <s>, and <strike> tags are converted to GFM double-tilde strikethrough syntax, commonly used for showing removed text.

~~This text is removed~~

โ˜‘๏ธ Task Lists

<input type="checkbox"> inside list items become GFM task list syntax. Checked boxes become [x] and unchecked become [ ].

- [x] Done
- [ ] To do

Related Tools

Frequently Asked Questions

FAQ

HTML to Markdown conversion is the process of transforming HyperText Markup Language (HTML) โ€” the standard language used to structure web pages โ€” into Markdown, a lightweight plain-text formatting syntax. For example, <h1>Hello</h1> becomes # Hello, and <strong>text</strong> becomes **text**. The result is a cleaner, human-readable document that's easy to edit, version-control, and re-use across platforms.

It's simple:
1. Paste your HTML into the left input panel, OR upload an .html file, OR enter a URL to fetch a page.
2. The tool converts it instantly as you type (real-time, 300ms debounce).
3. View the result in Raw or Preview tab on the right.
4. Click Copy to copy to clipboard, or Download to save as a .md file.
You can also adjust options (heading style, bullet style, GFM support) before converting.

There are many reasons to convert HTML to Markdown:
For Writers & Content Creators: Markdown is easier to read, write, and edit than raw HTML.
For Developers: Markdown integrates with static site generators (Next.js, Gatsby, Jekyll), documentation tools (Docusaurus, GitBook), and content management systems.
For LLMs & AI tools: AI assistants and large language models (LLMs) process Markdown much more efficiently than HTML โ€” it removes redundant markup, reduces token count, and preserves semantic structure.
For Git workflows: Markdown documents are clean plain text, making diffs readable and version control meaningful.

This tool supports a comprehensive range of HTML elements:
Structure: <h1>โ€“<h6>, <p>, <div>, <section>, <article>, <blockquote>, <hr>, <br>
Text Formatting: <strong>, <b>, <em>, <i>, <del>, <s>, <strike>, <code>, <mark>, <sup>, <sub>, <abbr>
Lists: <ul>, <ol>, <li> with full nesting support
Media & Links: <a href>, <img src>
Code: <pre>, <pre><code> with language detection from class names
GFM Extensions: <table>, <input type="checkbox"> for task lists, <del> for strikethrough

GitHub Flavored Markdown (GFM) is a superset of standard Markdown that adds extra features commonly used in developer workflows:
- Tables โ€” <table> elements are converted to pipe-style Markdown tables with header separators
- Strikethrough โ€” <del>, <s> tags become ~~text~~
- Task Lists โ€” <input type="checkbox"> inside list items become - [ ] or - [x]
- Auto-linking โ€” URLs in text are automatically made clickable
You can enable or disable GFM from the Options panel in the input area. GFM is enabled by default.

HTML <table> elements are converted to GFM pipe-style Markdown tables. The converter:
1. Reads the first <tr> as the header row
2. Detects column alignment from align attributes (left/center/right)
3. Generates a separator row with :---:, ---:, or :--- syntax for alignment
4. Adds all subsequent rows as body rows
Example: <th align="center">Name</th> โ†’ | :---: | separator.
Note: Complex tables with merged cells (colspan/rowspan) are simplified โ€” merged content is preserved but the merge structure is flattened.

Absolutely not. This tool is 100% client-side. All HTML-to-Markdown processing happens entirely in your web browser using JavaScript. Your HTML content never leaves your device โ€” nothing is uploaded, stored, logged, or transmitted to any server. You can even use this tool offline once the page is loaded.

Yes, using the URL Fetch feature. Paste any URL into the URL bar and click 'Fetch'. The tool will attempt to download the page's HTML and convert it.
Important: Due to browser security policies (CORS), some websites block direct fetching from scripts. If you see a CORS error, you can:
1. Use your browser's Developer Tools to copy the raw HTML and paste it directly
2. Use a CORS proxy service
3. Download the page (Ctrl+S) and upload the .html file instead

There are two ways to write headings in Markdown:
ATX Style (default):
# Heading 1
## Heading 2
### Heading 3 ... up to H6
Setext Style:
Heading 1
=========
Heading 2
---------
Setext only supports H1 and H2. H3โ€“H6 always fall back to ATX style.
ATX is recommended for most use cases since it supports all 6 levels and is more universally supported.

You can upload `.html` and `.htm` files up to 10MB in size. Drag-and-drop is also supported โ€” just drop an HTML file anywhere on the input panel.
For other formats (Word documents, PDFs, etc.), first convert them to HTML using your authoring software's 'Export to HTML' or 'Save as HTML' feature, then paste the resulting HTML here.