How do you convert Markdown to HTML?
Markdown is a lightweight way of writing formatted text with plain characters, such as # for headings and ** for bold. To publish it on the web it is converted to HTML. This Markdown to HTML converter parses CommonMark and GitHub Flavored Markdown (tables, task lists, strikethrough, fenced code), shows a live preview in a sandboxed frame and gives you the HTML source to copy. Active content is removed by default, and everything runs in your browser.
How to convert Markdown to HTML
- 1
Type or paste your Markdown into the left box, or press “Try an example”.
- 2
Check the live preview on the right.
- 3
Switch to “HTML code” to see the generated markup.
- 4
Copy the HTML or download it as a .html file.
Key features
GitHub Flavored Markdown
Tables, task lists, strikethrough, autolinks and fenced code blocks are supported, and can be switched off for strict CommonMark.
Sanitized by default
Scripts, event handlers, iframes and javascript: links are stripped from the output, and the preview runs in a sandboxed frame without scripts.
Line break control
Choose whether a single newline becomes a <br>, as in GitHub comments, or is treated as a space.
Private
Parsing happens in your browser with the marked library. Your text is not uploaded.
Frequently asked questions
What is the difference between Markdown and HTML?
Markdown is a short, readable syntax for common formatting, while HTML is the full markup language of web pages. Markdown is converted to HTML to be displayed in a browser.
Does it support tables and task lists?
Yes, with GitHub Flavored Markdown on. Tables use pipes and dashes, and task lists use - [ ] and - [x].
Is the generated HTML safe to publish?
With “Sanitize HTML” on, scripts, event handlers and dangerous URLs are removed. For user-generated content on a live site you should still sanitize on the server with a well-maintained library.
How do I add a line break in Markdown?
End the line with two spaces or a backslash, or leave a blank line for a new paragraph. You can also enable “Line breaks” so single newlines become <br>.
Can I convert HTML back to Markdown?
Yes. Use the HTML to Markdown converter on this site.