Markdown to HTML Converter

Write Markdown on the left, see the rendered page on the right, and copy clean, sanitized HTML below.

Rendered preview (sanitized)

Converted in your browser. Your Markdown is never uploaded or stored.

Advertisement

How to Use the Markdown to HTML Converter

Type or paste Markdown into the left pane. The right pane renders it as a formatted page while you type, and the HTML Output box below holds the markup that produced it. Click "Copy HTML" to put that markup on your clipboard, or "Download .html" to save it as a complete, standalone web page with a proper document header. "Load Sample" fills the editor with a short document that exercises every supported feature, which is a quick way to see the syntax side by side with its result.

Three options sit above the editor. "Line breaks become <br>" makes every newline a visible line break, the way GitHub comments and many chat apps behave, instead of the standard Markdown rule that joins lines into one paragraph. "Sanitize HTML output" is on by default and cleans the copied HTML of anything executable. "Load remote images in preview" controls whether images you reference by URL are fetched for the preview; turn it off if you would rather your browser not contact those image hosts. The preview itself is always sanitized, whatever you choose.

What Gets Converted

The converter handles the core syntax defined by the CommonMark specification plus the extensions popularized by GitHub. The most common patterns and the HTML they become:

You writeHTML produced
# Title through ###### Title<h1> through <h6>
**bold**, *italic*, ~~struck~~<strong>, <em>, <del>
- item or 1. item<ul> or <ol> with <li>
- [x] doneList item with a checked, disabled checkbox
[text](https://…) or a bare URL<a href="…">
![alt](image.png)<img src="image.png" alt="alt">
> quoted text<blockquote>
Backticks, or a fenced block with a language<code>, or <pre><code class="language-js">
Pipe table with a --- separator row<table> with <thead> and <tbody>
--- on its own line<hr>

Colons in a table's separator row, such as :---:, set column alignment, which the HTML expresses as an align attribute on each cell. Fenced code blocks keep their language name as a language-… class, so a syntax highlighter on your own site can color them later.

Advertisement

CommonMark, GFM, and Why Markdown Has Flavors

John Gruber introduced Markdown in 2004 as a way to write for the web using the conventions people already used in plain-text email. His original description left many edge cases open, such as how deeply a nested list must be indented or what happens when emphasis markers overlap, so different implementations made different choices. The same document could render differently on two websites.

CommonMark is a detailed specification, backed by an extensive test suite, that pins down those ambiguities. GitHub Flavored Markdown (GFM) is a strict superset of CommonMark that adds tables, task lists, strikethrough, and automatic linking of bare URLs, and it is what most developers mean when they say "Markdown" today. This page uses marked, a widely used open-source parser that follows both specifications closely. Other platforms still have their own dialects, with extras like footnotes, math, or wiki links. If your target system supports a feature this tool does not, the converter leaves that syntax as plain text rather than guessing.

Why the Preview Is Sanitized

Markdown allows raw HTML to pass straight through, which is useful for things Markdown cannot express but is also a security risk. A document containing <script> tags, an image with an onerror handler, or a link to javascript: would run code if its HTML were inserted into a page unchecked. That is a cross-site scripting (XSS) attack, and it matters any time you render Markdown you did not write yourself, such as a README from an unfamiliar repository or text submitted through a form.

Every preview here passes through DOMPurify, a well-established HTML sanitizer that parses the markup and keeps only an allowlist of safe elements and attributes. Scripts, inline event handlers, embedded frames, forms, inline styles, and dangerous URL schemes are removed before anything touches the page. The same cleaning is applied to the HTML output unless you switch it off. Turn it off only when the Markdown is your own and you deliberately rely on raw HTML, and keep in mind that the site where you paste it may run its own sanitizer anyway.

Practical Uses

Many content management systems, newsletter builders, and e-commerce product editors accept HTML but not Markdown. Drafting in Markdown and pasting the HTML gives you clean, consistent markup without the stray spans and inline styles that rich-text editors tend to leave behind. Developers use the converter to preview README files and documentation before committing, to check how a table or nested list will render, and to produce HTML snippets for static pages. Writers who keep notes in Markdown apps can turn a note into a publishable web page in one step. Because the output is plain semantic HTML with no classes or inline styles, it inherits the typography of whatever site you paste it into.

HTML email is the one place to be careful. Many email clients ignore stylesheets and need styles written inline on each element, so treat the output as a starting point and run it through your email platform's own editor or an inliner before sending.

Common Markdown Mistakes and How to Fix Them

Lines run together. A single newline inside a paragraph becomes a space. Leave a blank line between paragraphs, end a line with two spaces or a backslash for a hard break, or enable the line-break option above.

A list or heading does not render. A list or table that follows a paragraph line immediately is sometimes treated as part of that paragraph. Adding a blank line before it fixes the problem. Headings need a space after the hash marks: #Title stays literal, # Title becomes a heading.

Nested lists flatten. Sub-items must be indented far enough to line up with the text of the parent item, usually two spaces for a dash and three for "1.". Mixing tabs and spaces makes this unpredictable.

Underscores and asterisks vanish. Paired * or _ characters become emphasis. Wrap file names and code in backticks, or escape the character with a backslash, as in \*.

Tables collapse into text. A GFM table needs a header row followed by a separator row of dashes, with the same number of pipe-separated columns in each.

Links break on spaces. Spaces in a link destination end the URL early. Replace them with %20 or wrap the URL in angle brackets; our guide to URL encoding explains which characters need escaping.

Frequently Asked Questions

Which Markdown features does this converter support?

It supports standard CommonMark syntax, including headings, emphasis, lists, links, images, blockquotes, code, and horizontal rules, plus the GitHub Flavored Markdown extensions: tables, fenced code blocks, task list checkboxes, strikethrough, and automatic links for bare URLs.

Why did my line breaks disappear?

In standard Markdown a single line break inside a paragraph is treated as a space, so lines wrap together. Leave a blank line to start a new paragraph, end a line with two spaces or a backslash for a hard break, or turn on the "Line breaks become br" option to convert every newline into a break, as GitHub comments do.

Is the HTML output safe to paste into my website?

With "Sanitize HTML output" switched on, the HTML is cleaned with DOMPurify, which removes scripts, event-handler attributes, javascript: links, and other active content. That makes it suitable for pasting into a CMS. If you switch sanitizing off to keep raw HTML you wrote yourself, only do so for Markdown you trust.

Does the converter add CSS styles to the HTML?

No. The output is plain semantic HTML such as h2, p, ul, table, and pre elements with no inline styles or classes beyond language hints on code blocks. It inherits whatever styles your website or CMS applies. HTML email is the main exception, because many email clients ignore external stylesheets and need inline styles.

Is my Markdown uploaded to a server?

No. Conversion and sanitizing both run in your browser. Your text is never sent to QuickUtil or anyone else. The only network requests the preview can make are for images you reference by URL, and you can turn those off with the remote images option.

Advertisement

Related Articles

Expert guides and educational resources to help you master the math.

Related Tools

More free text utilities to help with your writing.