My Tool Studio
Developer

HTML to Markdown Converter

Paste HTML here to convert HTML to Markdown, or type a web address and click Convert web page. Headings, links, images, lists, bold and italic convert as you type, tables become GitHub pipe tables with column alignment, strikethrough becomes ~~text~~ and checkboxes become task list items. Options choose # or underlined headings, - * or + bullets, fenced or indented code, the italic and bold markers, and inline, reference or text-only links. Main content only drops the navigation, header, footer and forms of a full page, and pages loaded from a URL get absolute links. Check the rendered preview, then copy the Markdown or download a .md file. Conversion uses turndown in your browser.

Always freeNo sign upRuns in your browser
Output appears here...

How to use

01

Paste HTML or load a page

Paste a fragment or a whole page into the HTML pane, click Upload .html, or type a URL and click Convert web page. Try sample loads a page with a menu, a table, a task list and a footer.

02

Pick the Markdown style

Set Headings, Bullets, Code blocks, Italic, Bold and Links, and tick Main content only for full pages. With Live mode on, the default, the Markdown pane updates as you type or change an option.

03

Preview, copy or download

Tick Show rendered preview to check the result, then click Copy above the Markdown pane or Download .md. Check any table that used merged cells, since Markdown cannot show them.

Why HTML to Markdown Converter

HTML tags and the Markdown they become

The converter walks through the HTML and swaps each element for its Markdown form. Block elements such as headings, paragraphs and lists get blank lines around them. Inline elements such as links and bold text are converted in place. Anything without a Markdown form keeps its text and loses the tag.

If the result has stray backslashes, they are escapes: characters such as * or _ that appear in your text are escaped so they are not read as formatting.

HTMLMarkdown
<h1> to <h6># to ######
<p>Paragraph with a blank line after it
<strong> or <b>**bold**
<em> or <i>_italic_
<del>, <s> or <strike>~~text~~
<a href="url">[text](url)
<img src="x.png" alt="y">![y](x.png)
<ul><li>- item
<ol><li>1. item
<blockquote>> quote
<pre><code>Fenced code block
<table>Pipe table, first row as header
<input type="checkbox"> in a list item- [ ] or - [x] task item
<script>, <style>, <noscript>, <iframe>Removed

Common questions

Does HTML to Markdown conversion keep images and links?
Yes. A link becomes [text](url) and an image becomes ![alt](src). Untick Keep images to drop pictures, or set Links to Text only for plain text. Pages loaded with Convert web page get absolute URLs, while pasted HTML keeps relative URLs as they are.
How do I convert a whole web page to Markdown for docs or an AI prompt?
Type the address into the URL box and click Convert web page. Main content only is switched on for you, so the main or article element is kept and navigation, header, footer, aside and forms are dropped, and links become absolute. You can also paste the page source or upload a saved .html file.
Can HTML tables become Markdown tables?
Yes. Each row becomes a row of a pipe table and the first row is used as the header, as GitHub Flavored Markdown requires. Center and right alignment on the first row's cells becomes :---: and ---: markers, and line breaks inside cells become spaces. Merged cells made with colspan or rowspan need a manual fix.
What happens to inline styles and classes when converting HTML to Markdown?
They are dropped. Markdown cannot store class, id or style attributes, so only the structure and text survive. Elements with no Markdown equivalent, such as span or div, keep their content without the tag.
What Markdown style does the HTML converter produce?
By default, # headings, fenced code blocks with three backticks, - bullets, ** for bold and _ for italic, which work on GitHub, GitLab and most static site generators. Every one of these can be changed in the options above the panes.
Do I need pandoc to convert HTML to Markdown?
Not for everyday pages. This tool handles common HTML without any install. Pandoc is the better choice for batch conversions, footnotes, or converting to other formats such as Word or LaTeX.
Why did my nested list convert to Markdown badly?
Nested lists convert correctly when the inner ul or ol sits inside an li. If the inner list sits directly inside the outer list, which is invalid HTML, the converter cannot tell where it belongs. Fix the markup and convert again.
Does the HTML to Markdown converter send my content to a server?
Pasted HTML and uploaded files are converted by turndown inside your browser tab and never leave your device. Convert web page is different: this site's server fetches the page for you, because browsers block reading other sites directly, and the conversion then runs in your browser.
Can I convert the Markdown back to HTML later?
Yes, with the Markdown to HTML Converter. Round trips are close but not always identical, because details like classes and inline styles are lost on the way to Markdown.
What is the difference between inline and reference links in Markdown?
Inline links put the URL right after the text, as in [docs](https://example.com). Reference links use a short label, [docs][1], and list the URLs at the bottom, which keeps long paragraphs readable. Set Links to either style; Text only drops the URLs completely.

More Developer tools

View all