HTML to Markdown Converter
Convert HTML to Markdown online free. Paste a web page or Google Docs text, get clean CommonMark or GitHub Markdown with tables and code blocks, all in your browser.
Runs in your browserNothing uploadedFree · no signup
Text is escaped only where Markdown would read it as syntax, so snake_case and 2 * 3 stay as written while a line starting 1. does not turn into a list. Scripts and styles are dropped with their contents. Going the other way? Use Markdown to HTML, or the HTML tag remover if you only want the plain text.
Frequently asked questions
- Can I paste straight from a web page or Google Docs?
- Yes. When you copy formatted text, the clipboard holds two versions - plain text and the HTML behind it - and a text box normally takes the plain one, which has already lost the headings, links and bold. This tool takes the HTML instead, so pasting a section of an article or a Google Doc gives you real Markdown headings, lists and links. Google Docs marks bold and italic with inline styles on <span> tags rather than <b> and <i>, and wraps the whole paste in a <b> that is not bold at all; both are read correctly. Untick 'Paste formatted text as HTML' if you want to paste plain text.
- Why are some characters written with a backslash in front?
- Because Markdown would otherwise read them as formatting. A line starting '1.' becomes a numbered list, a line starting '#' becomes a heading, *text* becomes italic and [text](url) becomes a link, so when those characters appear in your text they are escaped with a backslash. It is done only where the character would actually be misread: snake_case keeps its underscores because an underscore inside a word never starts emphasis, 2 * 3 keeps its bare asterisk, and 2026. is only escaped when it starts a line. The result renders back to exactly the text you started with.
- Why did some bold text come out as <strong> instead of **?
- Because the ** form would not parse there. Markdown only treats ** as bold when the characters around it pass a set of rules, and bold text that ends in punctuation running straight into a word - <b>"quoted"</b>word, say - fails them, so ** would show up as literal asterisks. In that case the converter writes <strong>, which Markdown allows and every renderer shows as bold, and tells you how many times it did so. Everywhere else you get ordinary ** and *.
- What happens to tables?
- A simple table becomes a GitHub Markdown table with its columns padded to line up, alignment kept from align or text-align, and any | inside a cell escaped. Markdown tables must have a header row, so if yours has none the first row is promoted and you are told. A table with merged cells, several header rows, or a list or code block inside a cell cannot be written as a Markdown table at all, so it is kept as HTML - which Markdown permits - rather than flattened into something that reads differently. Untick 'Keep what Markdown can't express as HTML' to flatten it instead.
- What about <sup>, <u>, iframes and other tags Markdown has no syntax for?
- By default they are kept as HTML, because Markdown allows inline HTML and dropping a superscript silently changes what x2 means. <details> is written in the GitHub pattern with the tags on their own lines, so the Markdown inside it still renders. Untick 'Keep what Markdown can't express as HTML' to reduce them to plain text instead, and the tool counts how many were changed. Scripts and style blocks are always removed with their contents, and decorative icons marked aria-hidden are left out.
- Can I convert a whole saved web page?
- Yes. With 'Main content only' ticked, if the page has a <main> element - or a single <article> - only that is converted, so the navigation, header, cookie banner and footer are left out and you get the article itself. A page listing several articles is converted in full. Untick the box to convert everything.
- Is my HTML uploaded anywhere?
- No. The conversion runs entirely in your browser and nothing is sent to a server, so internal documentation, a draft post or a page from behind a login never leaves your device.