Skip to content
AZ Tools

Markdown → HTML Converter

Convert Markdown to clean HTML — copy the source for emails, CMS pages, or anywhere a rendered preview isn't enough.

HTML

How to use

  1. Paste Markdown in the input.
  2. Switch between rendered preview and raw HTML in the output.
  3. Toggle GFM, soft line breaks, or sanitization as needed.
  4. Copy the raw HTML for your CMS / email / template.

About this tool

Show

Convert Markdown to HTML with a live preview beside the source, using the widely used marked parser. Three switches change the result in ways worth understanding. GitHub-flavoured mode adds tables, strikethrough and automatic links, which is what most people mean by Markdown today. Soft breaks turn a single newline into a line break, the behaviour of chat apps and issue trackers, whereas plain Markdown joins those lines into one paragraph — this is the setting behind almost every complaint that line breaks disappeared. And sanitising strips raw HTML: Markdown deliberately allows inline HTML, so a document from someone else can carry a script tag, and turning this on is the right default for anything you did not write yourself.

Frequently asked questions

How is this different from Markdown Preview?

Markdown Preview shows you how the Markdown renders. Markdown → HTML gives you the actual HTML source as text so you can paste it into a system that needs HTML.

Why is sanitization on by default?

Markdown allows raw HTML, which can include scripts. DOMPurify strips dangerous tags / attributes while keeping links, formatting, and basic structure. Turn it off only if you trust the source. The preview on this page is always sanitized; the switch only changes the HTML you view as source and copy.

What does 'soft breaks → <br>' do?

By default, a single newline in Markdown becomes a space. With the toggle on, every newline becomes a <br>, which matches how chat apps like Slack and Discord render Markdown.

Which Markdown dialect?

marked's GitHub-flavored Markdown — tables, task lists, fenced code blocks, autolinks, strikethrough. Turn GFM off for stricter CommonMark.

Related tools