Skip to content

HTML to Markdown

Convert HTML into clean Markdown.

Runs in your browser · free · no sign-up

HTML
Markdown

About the HTML to Markdown

Move content from a web page or CMS into a Markdown file for GitHub, docs or static-site generators. Paste HTML and get clean Markdown that keeps headings, links, lists and code.

Markdown has become the default writing format for developer documentation, GitHub READMEs, static-site generators and many note-taking apps. When you move content from an existing website, a WordPress post or a rich-text editor, you start with HTML. Converting it by hand is slow, so this tool turns HTML into clean, readable Markdown.

It keeps headings, paragraphs, bold and italic, links, images, lists, blockquotes, code blocks and simple tables, and removes script and style tags. Choose ATX headings (# Title) or underlined headings, the bullet character and whether code blocks are fenced with ``` or indented. Conversion uses Turndown, a widely used open-source library, and the result can be copied or downloaded as a .md file.

You can also paste formatted text copied from a web page into some editors and view its HTML source first; pasting that source here then gives Markdown that matches the original structure, including headings and lists.

How to use the HTML to Markdown

  1. 1Paste HTML.
  2. 2Choose heading style (# or underline) and bullet character.
  3. 3Copy the Markdown.

Key features

  • Headings, lists, links, images and code.
  • Simple tables converted to Markdown tables.
  • Script and style tags removed.
  • Heading, bullet and code block style options.
  • Download as .md.

Practical uses

  • Migrating a WordPress blog to Hugo, Jekyll or Astro.
  • Copying documentation from a website into a GitHub wiki.
  • Saving web articles in Obsidian or Notion.
  • Converting CMS content for a README.

Example

<h2>Install</h2><p>Run <code>npm i</code> then open <a href="https://example.com">the docs</a>.</p> becomes “## Install” followed by “Run `npm i` then open [the docs](https://example.com).”

Tips and common mistakes

  • Copy only the article body, not the whole page, to avoid menus and footers.
  • Check image paths after converting, since relative links may need updating.
  • Use fenced code blocks for better syntax highlighting on GitHub.

Limitations

  • Complex tables with merged cells stay as HTML.
  • Styling such as colours and fonts has no Markdown equivalent and is lost.

Privacy

HTML is converted locally.

Frequently asked questions

Are tables supported?

Simple tables are converted to Markdown tables. Complex tables with merged cells are kept as HTML.

Will scripts or styles be copied?

No, script and style tags are removed.

Which library is used?

Turndown, an open-source HTML-to-Markdown converter.

Can I convert Markdown back to HTML?

Yes. The Markdown Editor shows the HTML for any Markdown you write.

What happens to inline styles?

They are dropped. Markdown has no styling, only structure such as headings, emphasis and lists.

Related tools

HTML Entity EncoderEscape or unescape HTML special characters.
HTML FormatterBeautify and indent HTML code.
HTML MinifierShrink HTML by removing spaces and comments.
YouTube Embed Code GeneratorNewResponsive YouTube iframe code with start time and options.