Convert Markdown to clean HTML as you type. Paste or write Markdown on one side and copy the generated HTML, with GitHub tables, task lists, fenced code blocks and heading anchors. The output is sanitized, so scripts and unsafe attributes are removed. Copy it as a fragment for a CMS or download a complete styled HTML page.
How to use
- Write Markdown in the editor, or drop, open or paste a .md file. A sample README is loaded to start from.
- Use the toolbar or shortcuts for bold, italic, headings, links, lists, task lists, code, quotes and tables.
- Switch to Preview to see the GitHub-style result with a clickable table of contents, or to HTML to get the generated markup.
- Copy the HTML, download a standalone styled .html page, or download the .md file.
- Supports GitHub Flavored Markdown: tables, task lists, fenced code blocks, strikethrough and autolinks. Headings get GitHub-style anchor ids.
- The HTML is sanitized, so scripts and unsafe attributes are removed from the output.
- Your draft is saved automatically in this browser and is still there when you come back.
- On wide screens, Split shows the editor and the preview side by side.
How Markdown maps to HTML
Each Markdown construct becomes a standard HTML element: # Heading becomes h1 (## h2 and so on), a blank line separates p paragraphs, - or * lines become ul with li items, 1. lines become ol, **text** becomes strong and *text* em, [text](url) becomes an a link, and  an img with alt text. A line of three dashes becomes hr, > quotes become blockquote, and fenced code becomes pre with code and a language-xxx class that most syntax highlighters pick up.
Tables become table with thead and tbody, and task list items become disabled checkboxes, as on GitHub.
Safe HTML for websites and email
Markdown can contain raw HTML, which is convenient but risky when the text comes from someone else. The converter runs the result through a sanitizer that keeps ordinary formatting but removes script tags, event handlers such as onclick and javascript: links. Paste the fragment into a CMS, a static site template or an email builder; for email, keep in mind that many clients ignore external CSS, so simple headings, paragraphs and lists render most reliably.
Frequently asked questions
How do I convert Markdown to HTML?
Paste the Markdown into the editor and switch to the HTML view. Copy the markup or download it as an .html file.
Is the HTML safe to paste into my site?
It is sanitized: scripts, event attributes and javascript: links are removed. Ordinary formatting, links, images and tables remain.
Does it support GitHub Flavored Markdown?
Yes. Tables, task lists, strikethrough, autolinks and fenced code blocks are converted, and headings get GitHub-style id attributes.
Can I convert a .md file?
Yes. Drop, open or paste a .md file into the editor; it is read in your browser and not uploaded.
What is the difference between the fragment and the full page?
The fragment is only the converted body content for pasting into an existing page. The full page adds html, head and a stylesheet so it opens nicely on its own.