HTML to Markdown Converter

Convert HTML to clean Markdown syntax — paste, convert, and copy instantly.

Input HTML
Output Markdown
Converted Markdown will appear here...
info

About HTML to Markdown Converter

HTML to Markdown Converter takes raw HTML markup and rewrites it as clean, portable Markdown syntax. It uses the Turndown library under the hood, which faithfully maps headings (h1-h6) to ATX-style # symbols, converts anchor tags to inline [text](url) links, wraps code in fenced triple-backtick blocks, and handles lists, blockquotes, bold, italic, strikethrough, and tables — producing the Markdown dialect accepted by GitHub, GitLab, VS Code, Notion, Obsidian, Jekyll, Hugo, and most other Markdown-aware platforms.

The typical trigger is a content migration: an article written in a CMS, a README draft composed in a WYSIWYG editor, or a documentation page scraped from a legacy site all arrive as HTML. Manually rewriting heading tags, link syntax, and code fences is tedious and error-prone. Pasting the source into this tool and clicking Convert produces correctly structured Markdown in one step, ready to commit to a repository or paste into a docs platform.

The entire conversion runs in your browser with no server round-trip. The Turndown library executes locally, so your HTML — whether it contains confidential API documentation, unreleased product copy, or personal notes — never leaves your machine. The tool is free, has no rate limits, and requires no account.

star

Key Features

check_circle

ATX-style headings

h1 through h6 elements become # through ###### prefix headings, the format expected by GitHub Flavored Markdown and most static site generators.

check_circle

Fenced code blocks

pre and code elements are wrapped in triple-backtick fences rather than indented four spaces, so syntax highlighters in GitHub, GitLab, and VS Code recognize them correctly.

check_circle

Inline links and images

Anchor tags become [label](href) Markdown links and img tags become ![alt](src) image syntax, preserving both the display text and the destination URL.

check_circle

Lists, tables, and blockquotes

Ordered and unordered lists, HTML tables, and blockquote elements are each converted to their Markdown equivalents, keeping structure intact for documentation and README files.

check_circle

Client-side only, no data upload

Conversion is executed entirely in your browser by the Turndown JavaScript library. Nothing is sent to a server, making it safe for internal documentation and proprietary content.

check_circle

Handles real-world messy HTML

Copy-pasted blog posts, CMS exports, and scraped pages often contain nested divs and inline styles. The parser strips presentational noise and keeps only the semantically meaningful elements.

help

How to Use

01

Paste HTML

Copy your HTML code and paste it into the left editor pane.

02

Convert

Click "Convert" to transform your HTML into Markdown syntax.

03

Copy Result

Use the copy button to grab your Markdown output.

code_blocks

Example

Headings, bold text, links, and a fenced code block are each converted to their Markdown equivalents in a single click.

HTML input
<h1>Getting Started</h1>
<p>Install the package with <strong>npm</strong>:</p>
<pre><code>npm install my-package</code></pre>
<p>Then visit the <a href="https://example.com/docs">documentation</a>
for configuration options.</p>
Markdown output
# Getting Started

Install the package with **npm**:

```
npm install my-package
```

Then visit the [documentation](https://example.com/docs)
for configuration options.
lightbulb

Common Use Cases

  • arrow_circle_right

    Migrating CMS content to a Git-based docs site

    Export pages from WordPress, Drupal, or Contentful as HTML, then convert them to Markdown to store in a repository and publish with Jekyll, Hugo, or Docusaurus.

  • arrow_circle_right

    Authoring GitHub and GitLab READMEs from existing HTML

    Turn an existing product landing page or internal wiki page into a properly formatted README.md without hand-rewriting every heading and link.

  • arrow_circle_right

    Preparing Obsidian and Notion notes from web content

    Paste the HTML source of an article or documentation page and get clean Markdown you can drop directly into an Obsidian vault or Notion import without reformatting.

  • arrow_circle_right

    Converting email newsletter templates for archiving

    HTML newsletters use table-heavy layout that cannot be read as raw source. Convert to Markdown to keep the text content and links in a human-readable, searchable archive.

  • arrow_circle_right

    Stripping HTML from WYSIWYG editor output for version control

    Rich-text editors produce HTML that diffs poorly in Git. Convert to Markdown before committing so code reviews show meaningful line-level changes instead of tag noise.

quiz

Frequently Asked Questions

What is HTML to Markdown Converter? expand_more
HTML to Markdown Converter is a free online tool that converts HTML markup into clean Markdown syntax. It handles headings, links, images, lists, code blocks, emphasis, and other common HTML elements.
Is my content secure? expand_more
Yes. All conversion happens entirely in your browser using JavaScript. No data is sent to any server, ensuring your content remains private and secure.
What HTML elements are supported? expand_more
The tool converts all common HTML elements including headings (h1-h6), paragraphs, links, images, ordered and unordered lists, code blocks, blockquotes, bold, italic, strikethrough, horizontal rules, and tables.
What Markdown style is used? expand_more
The output uses ATX-style headings (# symbols) and fenced code blocks (triple backticks), which are the most widely supported Markdown conventions and are required by GitHub Flavored Markdown.
How is this different from HTML to Text Converter? expand_more
HTML to Text strips all markup and returns unformatted plain text — no headings, no links, no code blocks. HTML to Markdown preserves document structure and converts it to Markdown syntax, so headings stay as headings, links stay as links, and code blocks stay as code blocks. Use HTML to Text when you only need the words; use HTML to Markdown when structure and formatting matter.
Will inline styles and class attributes be kept? expand_more
No. Presentational attributes such as style="color:red" and class names have no Markdown equivalent and are dropped during conversion. Only semantic meaning — heading level, link target, code content — is preserved.
Does it support GitHub Flavored Markdown tables? expand_more
Yes. HTML table elements are converted to the pipe-delimited table syntax used by GitHub Flavored Markdown and supported by most modern Markdown renderers.
Can I convert a full HTML page including the head and nav? expand_more
You can paste a full HTML document, but non-content elements like nav, header, footer, and aside will be included in the output. For best results, paste only the main content section of the page.