Markdown to HTML

Turn a Markdown subset into HTML and preview it. Character references are on HTML to Markdown · HTML entities

Preview
HTML

What is converted

This page turns a Markdown subset into HTML and shows the preview next to the source. It does the conversion in the browser. Named character references are on HTML entities. The other direction is HTML to Markdown.

How to use it

  1. Type Markdown. The preview and the HTML box update as you type.
  2. Convert runs the same conversion once.
  3. Show Example loads a note titled Notes, a paragraph with bold and inline code, a bullet list of alpha and beta, a numbered list of one and two, a quote, a link to https://example.com, and a horizontal rule.
  4. The HTML for that example contains <h1>Notes</h1>, <strong>bold</strong>, <code>code</code>, a ul, an ol, a blockquote, the link, and <hr>.
  5. Clear All empties the Markdown, the preview and the HTML. Copy Result copies the HTML.

The Markdown this page reads

ATX headings use one to six # characters. Blank lines separate paragraphs. **bold** and __bold__ are strong. *italic* and _italic_ are emphasis. Inline code uses backticks. A fenced block uses three backticks. Links are [text](url) and images are ![alt](url). Bullets start with - or *. Numbered items start with digits and a period. Quotes start with >. A rule is a line of ---, *** or ___.

A table is a header row, a separator row of dashes, and body rows, with cells split by |. Characters that would start HTML are escaped, so a raw <script> stays text. Task lists, strikethrough and footnotes are left as plain text.

Where people use it

  • Checking how a README fragment will look.
  • Copying a small HTML fragment into a page.
  • Turning a pipe table into a table element.

Questions

Why is a raw tag visible as text?

The page escapes HTML first, then applies the Markdown it knows.

Can this make a PDF?

The output is HTML. Print or PDF is a separate step.