Markdown to HTML Converter
Convert markdown into clean HTML source with a live preview, GFM options, and sanitization on by default.
Options
Markdown
paste your markdownHTML
Paste markdown on the left and the HTML appears here.
About this Markdown to HTML converter
Markdown is a plain-text authoring format; HTML is what a browser actually renders. This tool parses your markdown and hands you both sides of that translation — the generated HTML source you can paste into a template, and a live preview of how that markup renders.
CommonMark vs GFM
CommonMark is the strict specification: headings, emphasis, lists, links, blockquotes and code. GitHub Flavored Markdown adds four things CommonMark has no syntax for at all — pipe tables, strikethrough with ~~text~~, autolinks that turn a bare URL into an anchor without angle brackets, and task lists written as - [ ] and - [x]. Turn GFM off and those constructs fall through as literal text, which is exactly what you want when the output must survive a strict CommonMark pipeline.
Why sanitization is on by default
Markdown deliberately allows raw HTML to pass through untouched. That means a document you did not write can carry <script>, an <iframe>, an inline onerror handler on a broken image, or a javascript: href — and rendering it verbatim is a stored XSS bug. Sanitization strips executable tags, event-handler attributes and unsafe URL schemes while leaving the structural markup intact. Disable it only when you control the source and intend to keep embedded HTML such as a custom video embed.
The breaks option
In CommonMark a single newline is just whitespace — two lines of the same paragraph join into one line of output, and only a blank line or two trailing spaces produce a break. Chat-style editors trained people to expect otherwise, so breaks converts every single newline into a <br>. Useful for release notes and comment bodies, wrong for prose that was hard-wrapped at 80 columns.
Heading IDs
With header IDs enabled, each heading gets a slug derived from its text: lowercased, punctuation dropped, spaces replaced with hyphens, and a numeric suffix appended when two headings would otherwise collide. That is what makes #getting-started anchor links and generated tables of contents work. Leave it off when the HTML is a fragment dropped into a page whose IDs you do not own.
Everything runs in your browser — the markdown you paste never leaves the page.