DevToolPal
EN

HTML to Markdown Converter

Convert HTML to clean Markdown with headings, lists, links, images, code blocks and GitHub tables.

Runs locally, never uploaded

Options

List marker
Code blocks
Italic
Bold

HTML

0 chars · 0 B

Markdown

0 chars · 0 B

What it does

The HTML to Markdown converter turns HTML markup into clean, readable Markdown. Use it to move blog posts from a CMS into a static site generator, write README files from existing web pages, save documentation as notes, or prepare content for a wiki, GitHub issue or chat that understands Markdown.

The output follows common Markdown conventions: # headings, - list items, fenced code blocks with the original language, and GitHub Flavored Markdown tables and strikethrough. Text is escaped where needed so nothing is accidentally turned into formatting.

How to use

  1. Paste HTML into the input, upload an .html file, or click Sample.
  2. Adjust the style if your project has a convention: list marker, fenced or indented code blocks, the italic and bold markers, and inline or reference-style links.
  3. Copy the Markdown or download it as an .md file.

The result updates as you type, so you can paste a fragment, check the output and keep adjusting the HTML until the Markdown looks right. Nested lists are indented under their parent item, and table columns are padded so the raw Markdown lines up.

Example

This HTML:

<h2>Install</h2>
<p>Run the <strong>installer</strong> and read the <a href="https://example.com">guide</a>.</p>
<ul><li>Windows</li><li>macOS</li></ul>

becomes this Markdown:

## Install

Run the **installer** and read the [guide](https://example.com).

- Windows
- macOS

Tips

  • Copying from a browser? Use the page source or your developer tools to grab the HTML of the article element only, so menus and footers stay out of the result.
  • Reference-style links keep long URLs out of the text, which makes the Markdown easier to read and edit. The URLs are listed at the end.
  • Embedded data: images are dropped by default because they can be hundreds of kilobytes long. Turn on the option to keep them.
  • To go the other way, use the Markdown to HTML converter or preview the result in the Markdown previewer.

FAQ

› Which HTML elements are converted?

Headings, paragraphs, bold, italic, strikethrough, links, images, ordered and unordered lists (including nested lists), blockquotes, inline code, code blocks with their language, horizontal rules, line breaks and tables. Tables become GitHub Flavored Markdown tables.

› What happens to scripts, styles and the page head?

They are removed. Script, style, noscript, template, svg, iframe and the whole head section produce no Markdown, so you can paste the source of a complete web page and get only its readable content.

› What about HTML that Markdown cannot express?

Unknown tags are unwrapped and their text is kept. Attributes such as classes, inline styles and IDs are dropped, because Markdown has no syntax for them. A code block keeps its language when the code element has a class like language-js.

› Why are some characters escaped with a backslash?

Text that would otherwise turn into Markdown formatting, such as a line starting with 1. or words wrapped in asterisks, is escaped so the Markdown renders exactly like the original HTML text.

› Is the HTML uploaded?

No. The conversion runs in your browser with a JavaScript HTML parser, and nothing is sent to a server.