Markdown to HTML Converter
Turn Markdown into ready-to-paste HTML, as a fragment or a complete document, with a safe preview beside it.
Processed locally in your browser· Your data stays in your browser.
What is Markdown to HTML Converter?
This tool compiles GitHub-flavoured Markdown (headings, lists, tables, task lists, fenced code, links, images) into HTML and shows you the source code, not just the rendering. The result can be pasted into a CMS, an email template, a static page or a component.
By default the HTML is sanitized: <script>, event handlers such as onclick, and javascript: or data: links are removed and external links receive rel="noopener noreferrer". You can also indent the output and wrap it in a full <!doctype html> page with your own title.
How does it work?
- Paste your Markdown in the input box.
- Keep "Sanitize the HTML" on for untrusted content; turn it off only if you fully trust the source.
- Choose pretty-printing, GFM line breaks, and whether to wrap the result in a full HTML document with a title.
- Copy the HTML source or download it as document.html; the sanitized preview is shown underneath.
Common use cases
- Converting a README or documentation page to HTML for a static site.
- Producing the HTML body of a newsletter or email from Markdown notes.
- Generating a standalone HTML file from meeting notes to share as an attachment.
- Checking exactly which HTML tags a Markdown construct produces.
Examples
Try this input in the tool above:
# Release notes
A short **Markdown** demo with *emphasis*, ~~strikethrough~~ and `inline code`.
## Checklist
- [x] Write the draft
- [x] Add a table and a code block
- [ ] Review the [style guide](https://example.com/style-guide)
- [ ] Publish
## Steps
1. Install the dependencies
2. Run the build
3. Check the output
## Comparison
| Format | Readable | Portable |
|----------|:--------:|---------:|
| Markdown | yes | high |
| HTML | partly | high |
| PDF | yes | medium |
```js
const greet = (name) => `Hello, ${name}!`;
console.log(greet("world"));
```
> Tip: a blank line starts a new paragraph.
---
See the [documentation](https://example.com/docs) fo
…Privacy
Markdown to HTML Converter runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.
Limitations
With sanitizing turned off the HTML source is unfiltered and may contain any raw HTML found in your Markdown. The preview always stays sanitized. Styling is not included: the output has no CSS.
Frequently asked questions
What does the sanitize option change?
It runs the HTML through DOMPurify with a strict allow-list, removing scripts, inline event handlers, styles and dangerous URL schemes. Off, you get the raw converter output.
Can I get a complete web page instead of a fragment?
Yes. Enable "Full HTML document" to add <!doctype html>, <html lang>, a charset and viewport meta tag, your title and the <body> wrapper.
Is Markdown inside HTML blocks converted?
Following the CommonMark rules, Markdown inside a raw HTML block is left as-is. Leave a blank line after the opening tag if you need it processed.
Related tools
Markdown Editor & Live Preview
Type or paste Markdown on one side and read the rendered result on the other, with instant document statistics.
Markdown & Diagrams
HTML to Markdown Converter
Paste an HTML fragment or a saved web page and get clean Markdown with the style options you prefer.
Markdown & Diagrams
HTML Formatter
Paste minified or messy HTML and get clean, consistently indented markup you can read and diff.
Developer Tools
HTML Minifier
Shrink your HTML with a conservative minifier that leaves <pre>, <textarea> and <script> content untouched.
Developer Tools
HTML to Text Converter
Paste HTML and get clean plain text with sensible line breaks, bullets and optional link addresses.
Developer Tools
Strip HTML Tags
Delete every tag from a piece of HTML and keep only the text, with your choice of line breaks and entity decoding.
Developer Tools
Markdown Table Generator
Paste spreadsheet-style rows and get a tidy, GitHub-ready Markdown table with padded columns and per-column alignment.
Markdown & Diagrams