Skip to content
gohacks.dev
Web

HTML to Markdown Converter

Convert HTML to clean Markdown: headings, emphasis, links, images, nested lists, blockquotes, fenced code blocks with their language, and tables.

Free · No sign-up · Your inputs stay in your browser

Input

Convert HTML to Markdown

Output

Markdown

0 characters

Writes CommonMark plus GitHub's tables and strikethrough: headings as #, emphasis as ** and _, fenced code blocks that keep the language- class, nested lists, blockquotes and links with titles. Scripts, styles and anything the browser would not render are dropped.

Runs in this browser. Nothing you paste is sent to a server.

Moving content between systems

The common case is migrating a CMS or a wiki to Markdown files for a static site or a docs repository, or pasting a web page into a README. Markdown cannot express everything HTML can: colspan, classes and inline styles have no equivalent and are lost, so check pages with complex layouts by eye. The CommonMark specification is the reference for what the output means.

Characters that need escaping

Asterisks, underscores, backticks and square brackets in ordinary text are escaped with a backslash so they do not turn into formatting, which is why a converted filename like file_name.md keeps its underscores.

Share

Frequently asked questions

Does the converter keep the language of code blocks?
Yes. A code element with a class such as language-php produces a fence that starts with ```php, which GitHub and most static site generators highlight.
What happens to HTML that Markdown cannot express?
It is reduced to its text. Markdown allows raw HTML inline, so for a few complex elements, pasting the original HTML back into the Markdown file is often the cleanest fix.
Is what I paste sent anywhere?
No. The tool runs entirely in your browser with JavaScript. Nothing you type or paste is sent to our server or stored.

Keep planning

Similar tools