Convert markdown to HTML
Paste markdown or open an .md file and watch it render. Switch to HTML for the markup itself, and copy whichever you need.
How to use it#
- Paste or type your markdown into the box above, or open an .md file with Open .md file or by dropping it on the box.
- Watch the preview, or switch to HTML to see the markup.
- Tick line breaks as written if single newlines should become breaks.
- Copy the HTML, or download it as a file.
Which markdown this speaks#
GitHub Flavored Markdown, which is the dialect most people mean when they say markdown. That gets you tables, fenced code blocks with a language after the backticks, strikethrough with double tildes, task lists, and automatic links from bare URLs. Plain CommonMark has none of those.
That makes the preview a quick check on a README before you push it: a table missing its divider row or a code fence left open shows up here as it would on the code host, though the styling around it differs.
Raw HTML in the middle of your markdown is passed through rather than escaped, because that is part of the format and is how people handle the things markdown has no syntax for: a div with a class, an iframe, a details block that folds away.
Why the preview runs in a sealed frame#
Markdown can legitimately contain HTML, and HTML can contain a script tag. Any tool that shows you a live preview is therefore running markup that came from somewhere, and if that markup is pasted from a bug report, a pull request, or a colleague, the script in it is not yours.
The preview here is an iframe with every permission withheld. Nothing inside it can run script, reach this page, read anything, or navigate anywhere. Stripping dangerous tags out of the output instead would mean the HTML you are handed is not the HTML your markdown produces, and it would leave you trusting a list of what counts as dangerous today.
The markup itself is never filtered, so what you copy is what your markdown means. Where it ends up is where it needs sanitising, against the rules of that destination.
The line break question#
In original markdown a single newline is just a space: paragraphs are separated by blank lines, and a line break inside one needs two trailing spaces. That trips up almost everybody, because the markdown in comment boxes on GitHub, Slack, and most chat tools does the opposite and honours every newline.
Line breaks as written switches to that behaviour. Leave it off when you are writing prose that will be re-wrapped by the reader, and turn it on for an address, a poem, or anything you typed expecting the shape to survive.
Where the HTML goes next#
The output is a fragment, not a page: headings, paragraphs, and lists with no html or body around them. That is what you want when pasting into a template, a CMS field, or an email builder, all of which supply their own document.
It also carries no styling of its own. The preview here applies some so the result is readable, but that styling is not in what you copy. Dropped into a page with its own stylesheet, the markup inherits it.
Going the other way, from a web page or an HTML file back to markdown, is what the HTML to markdown converter does. It has the same line breaks setting, so markdown converted there and back comes out as it went in.
Frequently asked questions#
Is my writing uploaded anywhere?
#
No. The conversion happens in this tab, and the preview runs locally in a sealed frame. Nothing is sent to a server, so an unpublished draft stays yours.
Can I use it as a markdown viewer?
#
Yes. Paste the markdown or open the .md file and leave Show on Preview, and it renders as formatted text, with headings, tables, and code blocks laid out. Nothing needs to be installed, and the file stays on your device.
Why did my line breaks disappear?
#
Because in standard markdown a single newline is treated as a space, and only a blank line starts a new paragraph. Tick line breaks as written to honour every newline, which is how GitHub comments and most chat tools behave.
Is the HTML sanitised?
#
No, deliberately. Raw HTML is part of markdown, and stripping it would hand you different markup than your document means. The preview is made safe by running in a frame with no permissions instead. Sanitise at the point the HTML is published, against that destination's rules.
Does it support tables and task lists?
#
Yes. This uses GitHub Flavored Markdown, so pipe tables, fenced code blocks, strikethrough, task lists, and bare URLs all work. Those are extensions, so a stricter CommonMark renderer elsewhere may not accept them.
Can I convert an .md file?
#
Yes. Press Open .md file above the box, or drop the file on it, and its text goes into the box to convert. The file is read in this tab, not uploaded. MD to HTML is then the same conversion as any other markdown, the preview shows how the file will render, and the download takes the file name, so README.md comes back as README.html.
Is the output a complete web page?
#
No, it is a fragment: the headings, paragraphs, and lists, with no html or body wrapper and no styles. That suits pasting into a template or a CMS, which supplies the document around it.