HTML to Markdown
Paste HTML on the left, or copy a web page or document and paste it. If the HTML has a title and a description, they become the front matter at the top. Nothing is uploaded: the text is converted in your browser.
Convert HTML to Markdown Online, Free
Paste HTML on the left, or copy a page, a Word document or a Google Docs text and paste it, and get Markdown on the right as you type. It is made for text you want to publish with Hugo, Astro, Grav and similar engines. Everything happens in your browser: your text is never uploaded.
How the converter works
- It reads the HTML like a browser. The HTML is parsed by the browser itself, in a safe document where nothing runs or loads, and the structure is converted element by element. That is why nested lists, links inside lists and tags that span lines work, which is where converters made of regular expressions break.
- What becomes Markdown: headings, paragraphs, bold and italic, links, images, ordered and unordered lists (also nested), quotes, inline code and code blocks (the language is taken from
class="language-js"), horizontal rules and tables. Text characters that would be read as Markdown, such as asterisks or square brackets, are escaped. - Paste from a page, Word or Google Docs. When you paste formatted text, the HTML behind it is used. Bold and italic that Word and Google Docs write as styles are recognized. When you paste HTML source, for example from an editor, it is taken as text.
- Tables and strikethrough. The default "GFM" setting writes tables as Markdown tables and strikethrough as
~~text~~, which Hugo, Astro and Grav read. The "Strict" setting keeps tables and strikethrough as HTML, which classic Markdown allows. - Front matter. If the HTML has a
<title>tag and a description meta tag (<meta name="description">), a YAML block withtitleanddescriptionis put at the top, as Hugo, Astro and Grav expect it. A tag that is missing is left out, nothing is invented, and without both tags there is no front matter. Everything before</head>is skipped as the head of the page, or, when there is no</head>, everything before<body; the conversion starts after it.
Limitations
- Markdown cannot say everything HTML can. Styles, classes and colors are lost. Elements that Markdown has no syntax for, such as iframes, video, audio, superscript, subscript and highlighted text, stay as HTML. Tables with merged cells or lists and headings inside cells also stay as HTML tables.
- Your engine may hide raw HTML. Hugo, for example, leaves out raw HTML from Markdown by default. Check the setting of your engine if some parts do not appear.
- Containers are dropped. Tags such as div, span and section disappear, only their text and structure stay. Buttons, forms, scripts, styles and embedded graphics are not converted.
- Word lists made of typed bullets (a paragraph that starts with a dot or a dash instead of a real list) cannot be told from normal paragraphs and are converted as paragraphs.
- Front matter has only two keys. The schema of every site differs, so only
titleanddescriptionare written. Add the date, tags, categories or draft by hand.
Similar tools
Convert Markdown to HTML online. Strict classic Markdown (CommonMark), live preview, optional front matter. Works in your browser, nothing is uploaded.
Remove all HTML tags from text online. Keeps line breaks, drops scripts and styles, decodes entities. Runs in your browser, nothing is uploaded.
Minify your HTML by removing all the unnecessary characters.
Popular tools
Get the web-host of a given website.
Get approximate IP details.
Find A, AAAA, CNAME, MX, NS, TXT, SOA DNS records of a host.
Check the total size of a web page, including all resources, for performance analysis.