MarkdownPDF

HTML to Markdown Converter

Paste HTML code — or copy straight from a web page, Word or Google Docs — and get clean Markdown as you type. Tables, links and code blocks included; nothing uploaded.

Or drop an .html file, or browse

Your file never leaves your device

Markdown

The Markdown appears here as soon as there is HTML on the left.

When HTML to Markdown is useful

Moving a blog or a help centre to a static-site generator. Saving an article into Obsidian or Logseq. Giving an AI model the text of a web page without thousands of tokens of markup — Markdown carries the same structure for a fraction of the tokens, which is why RAG pipelines normalise to it. Or simply getting a table out of a web page into a README.

How to convert HTML to Markdown

  1. Paste HTML source into the box, drop a saved .html file, or copy a section of a web page, a Google Doc or a Word document and paste it directly.
  2. Leave Main content only on for a full web page, so menus, sidebars and footers are left out; turn it off to convert everything.
  3. Tick Keep images if you want image links kept in the Markdown.
  4. Copy the Markdown, or download it as a .md file.

Doing it in code

To convert many pages, use a library instead: turndown (with the GFM plugin for tables) in JavaScript — the same approach this tool is built on — markdownify or html2text in Python, or pandoc -f html -t gfm page.html -o page.md on the command line. Whatever you pick, the step that makes the difference is removing navigation, scripts and boilerplate before converting; a converter reproduces faithfully whatever it is given.

What is dropped on purpose

Styling, classes, inline CSS, scripts and layout wrappers. Markdown describes what text is — a heading, a list, a link — not how it looks, so anything purely visual has nowhere to go. Elements with no Markdown equivalent, such as <video>, are reduced to their text.

Going the other way

Markdown to HTML turns Markdown back into sanitised HTML with a live preview, and Word to Markdown converts a whole .docx file, images included. The Markdown cheat sheet covers the syntax you will see in the output.

Frequently asked questions

Still stuck? Ask us.

Can I paste formatted text instead of HTML code?

Yes, and it is often the quickest route. Select content in a browser, Google Docs, Word or Notion, copy it, and paste it into the box: the formatted version travels through the clipboard as HTML, so headings, links, lists and tables are converted. Pasting HTML source code works too.

What does “Main content only” do?

It removes scripts, navigation menus, sidebars, forms and the page’s own header and footer, and keeps the <main> or <article> element when there is one. For a full saved web page this is the difference between an article and a wall of menu links. Turn it off to convert everything.

Which Markdown flavour does it produce?

GitHub-flavored Markdown: # headings, - bullets, **bold**, *italic*, ~~strikethrough~~, pipe tables, task lists, and fenced code blocks that keep their language when the HTML marks it (class="language-js"). That output works on GitHub, GitLab, Obsidian, Notion imports and static-site generators.

Why did my table come out as plain lines?

Markdown tables are simple grids. A table whose cells contain lists, several paragraphs or other tables, or that uses merged cells, cannot be written as a pipe table. Simple data tables convert cleanly, and a table without a header row gets its first row promoted.

How do I convert HTML to Markdown in Python?

The markdownify package is the common choice: pip install markdownify, then markdownify.markdownify(html, heading_style="ATX") for # headings. html2text is an older alternative, and pandoc -f html -t gfm works from the command line. Strip navigation and scripts first, or they end up in the Markdown too.

Is the HTML sent anywhere?

No. It is parsed as an inert document in your browser — scripts in it do not run and images in it are not loaded — and converted on the spot. Nothing is uploaded, and the page never fetches the URLs in the HTML.

Can I convert a URL directly?

Not from here: fetching a page would mean sending your request through a server, which this site does not do. Open the page, press Ctrl+S (or Cmd+S) to save it as HTML and drop the file, or select the article text and paste it.

Limitations

Guides