How to convert Markdown to HTML
- Type or paste Markdown in the left box. You can also drop a
.mdfile on it. - The HTML source appears on the right, with a live preview below it.
- Select Copy to put the HTML on your clipboard or Download to save a
.htmlfile.
Use the options at the top to turn GitHub-style tables and task lists on or off, or to turn single line breaks into <br> tags.
What Markdown is
Markdown is a plain text way of writing formatted documents. A # makes a heading, asterisks make bold or italic text, and a dash starts a list item. It was designed to be readable as plain text and to convert cleanly to HTML, which is why README files, documentation sites, blogs and chat tools all use it.
This converter uses the marked library, which follows the CommonMark rules, plus the common GitHub extensions. The HTML it produces is then sanitized so that pasted content cannot run scripts in your page.
Why sanitizing matters
Markdown allows raw HTML, so a document can contain a script tag or an onerror attribute that runs code when displayed. If you show converted text from someone else, that is a security risk called cross-site scripting. DOMPurify removes the dangerous parts and keeps the safe formatting. The preview you see is the sanitized result, so what you see is what you copy.
Tips
- Leave a blank line between paragraphs, lists and headings. Missing blank lines are the most common reason for odd output.
- Use fenced code blocks with three backticks, and add a language name after them for syntax highlighting in the page that shows the HTML.
- The output has no styles. Your site’s CSS decides how headings, tables and code blocks look.
- Going the other way? Use HTML to Markdown to turn a web snippet back into Markdown.
- If you embed images as data, the image to Base64 tool makes the text for you.
Nothing is uploaded, and no account is needed.