TTKTheTextKit

HTML to Markdown Converter

Convert HTML into clean Markdown as you type. Paste a web page, a blog post, an email or a snippet from a CMS and get headings, paragraphs, bold and italic text, nested lists, task lists, tables, block quotes, fenced code blocks with their language, links and images as standard GitHub Flavored Markdown. Your browser's own HTML parser reads the markup, so broken or unclosed tags are handled the way a browser handles them.

842 charactersParsed by your browser, nothing runs
Generated Markdown0 chars
# No output

Related Tools

[7 suggestions]

Guides for the HTML to Markdown Converter

About the HTML to Markdown Converter

Markdown is easier to write, review in version control and move between systems than HTML, so people often need to bring old pages across: blog posts into a static site generator, help articles into Obsidian or Notion, documentation into a Git repository. This tool reads your HTML with the browser's HTML parser and walks the resulting page, instead of matching tags with text patterns, which is what keeps nested lists, tables, entities and code blocks correct. Headings become # lines, strong and em become ** and *, links keep their title, lists keep their levels and start number, tables become pipe tables with their alignment, and pre blocks become fenced blocks with the language from the class name. Characters that Markdown would read as formatting, such as * or a line that starts with 1., are escaped so the text means the same thing after conversion. Where a pair of bold or italic marks would not be read as formatting, it is written as a tag instead. Scripts, styles, comments, forms and icons are dropped, and a link that runs script keeps its text but loses the link. Bold and italic set with a style attribute, as Google Docs and Word do, are kept. Markdown cannot express classes, ids, colors, merged table cells or several paragraphs in one table cell, so those are not carried over. Superscript, subscript, underline and highlight can be kept as HTML tags with one checkbox. The conversion runs in your browser and nothing is uploaded.

How does the tool handle nested lists and tables?▾

A list inside a list keeps its depth, and an ordered list keeps its start number. A table becomes a GitHub Flavored Markdown pipe table: the first row is the header, column alignment is read from align attributes or text-align styles, and a pipe inside a cell is escaped. Markdown tables cannot merge cells, so a colspan adds empty cells and a rowspan is ignored.

What happens to class, id and style attributes?▾

They are dropped, because Markdown records structure, not appearance. The exceptions are the language in a class such as language-js on a code block, text-align on table cells, and font-weight, font-style and line-through in a style attribute, which is how Google Docs and Word mark bold, italic and strikethrough.

Can I paste a whole HTML page with head, scripts and styles?▾

Yes. Only the page body is converted. Scripts, styles, comments, forms, buttons, icons and embedded frames are left out, and nothing in the pasted page runs.

Why does the output contain tags like strong or em?▾

In Markdown, ** and * only work when the character next to them is the right kind. For example, bold text that ends in punctuation and is followed by a letter is not read as bold. In those cases the tool writes the HTML tag instead, which every Markdown renderer accepts.

Why are some characters in my text escaped with a backslash?▾

A backslash keeps text that looks like Markdown syntax from being read as syntax. For example, a paragraph that begins with 1. would become a list, and a lone asterisk could start italics. The backslash does not show when the Markdown is rendered.