Skip to content
Wordpad Online

Markdown to HTML Converter

Clean HTML from Markdown: a fragment to paste in, or a whole page

The result appears here as you type or paste.

Converted in this browser tab. Nothing leaves your device and nothing is kept unless you choose “Open in Markdown editor”.

Markdown to HTML, as you type

Type or paste Markdown on the left and the HTML appears on the right as you write, with a preview one tab away. Choose a fragment to paste into a site or a CMS, or a whole page with its own small style sheet, add ids to headings for links, then copy the code or download the .html file.

How it works

  1. Write or paste Markdown. A README, a blog post, documentation: anything in CommonMark or GitHub Flavored Markdown.
  2. Pick the output. Fragment for pasting into a site, Whole page for a file that stands alone. Heading ids add anchors to every heading.
  3. Copy or download. Copy takes the code to the clipboard; Download HTML saves it as a file.

For writing longer pieces, the Markdown editor keeps the text in your browser with a live preview, and exports HTML too. Going the other way? Use HTML to Markdown.

Things to know about the HTML

  • No syntax colours: code blocks get a language-… class, ready for a highlighter such as Prism or highlight.js, but no colours of their own.
  • Raw HTML passes through into the code unchanged, scripts included; only the preview is cleaned.
  • Footnotes, maths and diagrams are not part of GitHub Flavored Markdown and stay as plain text.
  • Pictures keep their web addresses in the code; the preview does not load them.

What you get

  • HTML as you type, with a preview one tab away
  • GitHub Flavored Markdown: tables, task lists, strikethrough, fenced code
  • A fragment for a CMS, or a whole page with title and styles
  • Heading ids made the way GitHub makes them, for links to sections
  • Code blocks marked with their language for syntax highlighters
  • Copy to the clipboard or download an .html file
  • Formatted text you paste turns into Markdown first
  • Converted in your browser: nothing uploaded, no account

Other converters

  • Markdown to PDFA README or notes as a paged PDF with real, selectable text.
  • Text to PDFA .txt file or pasted text as a PDF, with line numbers if you like.
  • Markdown to WordA chat answer or .md file as a Word document with real headings.
  • HTML to MarkdownHTML code, or text copied from a web page, as tidy Markdown.
  • Word to MarkdownMarkdown from a Word file or a Word copy-paste, pictures alongside.
  • Text to WordPlain text as a Word document, hard-wrapped lines joined if you wish.

Questions

How do I turn Markdown into HTML?

Paste the Markdown or open a .md file. The HTML tab fills in as you type; Preview shows how a browser draws it. Copy puts the code on your clipboard, and Download HTML saves it as a file named after the first heading.

Fragment or whole page: which one do I need?

A fragment is just the converted content, from the first heading to the last paragraph, for pasting into a blog editor, a CMS or a template that has its own styles. A whole page adds <!doctype html>, a <head> with the title and a small style sheet, so the file reads well when opened on its own.

Does it support GitHub Flavored Markdown?

Yes: tables, task lists (written as disabled checkboxes), strikethrough, fenced code blocks with their language as a class (language-js and so on) and web addresses that turn into links. The output is the same HTML that common Markdown tools give, without extra classes or wrappers.

What are heading ids for?

With Heading ids ticked, every heading gets an id made from its words, the way GitHub makes them: “Getting started” becomes id="getting-started". That lets a table of contents or another page link straight to the section with #getting-started.

Is HTML inside my Markdown kept?

Yes, in the code: raw HTML passes through as written, as in other Markdown tools, so check code from someone else before you publish it. The Preview tab is cleaned, though: scripts, forms and frames are not run or shown there.

Can I get Markdown back from HTML?

Yes, with the HTML to Markdown converter, which also takes formatted text copied from a web page.