Markdown to HTML Preview
Text Tools
Preview GitHub Flavored Markdown as sanitized HTML in your browser. Edit live, copy Markdown or HTML, and download either format without uploading your text.
How to use this tool
- Type or paste your Markdown. Replace the sample content in the editor with your own Markdown text. The preview updates instantly.
- Check the live preview. The right pane (or "Preview" tab on mobile) shows the rendered result with headings, tables, code blocks, and all GFM elements.
- Copy the HTML output. Copy the original Markdown or sanitized HTML, or download a .md file or standalone .html document for your next writing or publishing step.
What is Markdown?
Markdown is a lightweight plain-text formatting syntax created by John Gruber in 2004. It lets you write using an easy-to-read, easy-to-write format that converts cleanly to HTML. The idea is that Markdown should be readable as-is, without looking like it has been tagged up with HTML.
Most developers, technical writers, and documentation systems use Markdown today: GitHub, GitLab, Stack Overflow, Notion, Obsidian, Reddit, and hundreds of CMSes all support it.
GitHub Flavored Markdown (GFM)
This tool uses GitHub Flavored Markdown (GFM), a widely adopted superset of the original CommonMark specification. GFM adds:
- Tables: using pipe characters to define columns and rows.
- Task lists: checkboxes with
- [ ]and- [x]syntax. - Strikethrough: wrap text in
~~double tildes~~. - Fenced code blocks: triple backticks can include a language hint such as
```js. The preview keeps code monochrome and emits that hint as alanguage-*class; it does not load a syntax highlighter. - Auto-linking: bare URLs are turned into clickable links.
Markdown quick reference
| Syntax | Output |
|---|---|
# Heading 1 | Large heading |
## Heading 2 | Smaller heading (up to ######) |
**bold** | bold |
*italic* | italic |
~~strikethrough~~ | |
`inline code` | Inline monospace code |
[text](url) | Hyperlink |
 | Image |
> text | Blockquote |
- item | Unordered list item |
1. item | Ordered list item |
- [x] task | Checked task list item |
--- | Horizontal rule |
Security: why HTML is sanitized
Markdown allows embedding raw HTML. While this is powerful, it also means a malicious source
could include <script> tags, javascript: links, or inline event
handlers like onerror=. This tool runs all output through DOMPurify, an industry-standard DOM sanitizer, before rendering or copying. Dangerous elements and
attributes are stripped while all safe, standard HTML is preserved.
How the preview works
The page parses Markdown with marked using GitHub Flavored Markdown support and soft line breaks disabled, then sanitizes the generated HTML with DOMPurify before it is displayed or copied. This keeps the preview close to common GitHub-style rendering while removing unsafe markup from raw HTML in the source. Parsing, previewing, copying, and downloads all happen in your browser.
Difference between this tool and the full Markdown Editor
This tool stays focused on a quick paste-to-preview workflow, with direct Markdown and HTML copy and downloads. The full Markdown Editor is already available for longer writing sessions, with formatting shortcuts, local multi-document autosave, and Markdown/HTML import and export.
Paste from clipboard tips
Copying text from a word processor (Microsoft Word, Google Docs) and pasting it here will
produce plain text - the bold, headings, and italics from the word processor will
not transfer automatically, because Markdown is plain-text markup. To get formatted output,
you need to add the Markdown syntax yourself (e.g., **bold**,
# Heading).
Similarly, copying a formatted email and pasting it produces stripped plain text. If you want to convert rich-text HTML to Markdown first, use a dedicated HTML-to-Markdown converter.
Markdown beyond developers
Markdown is no longer just a developer tool - it is now the default writing format in many widely used platforms:
- GitHub / GitLab: READMEs, issues, pull requests, and wikis all render Markdown.
- Notion: supports Markdown shortcuts (type
#for a heading,**for bold). - Slack: uses a subset of Markdown for bold, italic, code, and strikethrough in messages.
- Discord: supports bold, italic, underline, code blocks, and spoiler tags using Markdown-like syntax.
- Stack Overflow / Reddit: both use CommonMark or Markdown-like formatting in posts.
Learning the basics of Markdown pays dividends across dozens of platforms - it is quickly becoming the universal writing layer of the web.
Frequently asked questions
What Markdown flavors are supported?
GitHub Flavored Markdown (GFM), which is a superset of CommonMark. That includes standard paragraphs, headings, bold/italic, links, images, code blocks, blockquotes, ordered and unordered lists - plus GFM extensions: tables, task lists (checkboxes), strikethrough, and auto-linking.
Is the rendered HTML safe to use?
Yes. The HTML output is sanitized with DOMPurify before being displayed or copied. Any potentially dangerous HTML that could be embedded in a Markdown source - such as <script> tags or javascript: links - is stripped automatically.
Can I write raw HTML inside the Markdown?
Markdown allows raw HTML passthrough, but all HTML is sanitized before rendering. Safe tags like <div>, <span>, <details>, and <summary> are preserved; dangerous elements and attributes are removed.
What does "Copy HTML" copy?
Copy HTML copies the sanitized markup shown in the preview. Copy Markdown copies your original source. You can also download the source as a .md file or the sanitized output as a standalone .html file.
Is my text saved anywhere?
No. Your text stays in the browser and is never sent to a server. If you refresh the page, the sample content reloads. If you need persistence, copy your Markdown to a local file.
Related text tools
- Markdown EditorOpen Markdown Editor for formatting shortcuts, local multi-document autosave, and Markdown or HTML import and export.
- HTML -> MarkdownTurn formatted HTML into Markdown when your content starts as rich text.
- Markdown TableBuild a Markdown table visually, then paste it into your document.
- Clipboard -> MarkdownConvert rich text copied from a webpage or document into clean Markdown.