Markdown Preview and Markdown to HTML

Write or paste Markdown and watch the preview update as you type. Copy the HTML or download it as a file.

Preview

The preview appears here.

Runs entirely in your browser. Nothing you enter is sent or stored.

How to use

  1. Type or paste Markdown into the left box.
  2. Check the rendered result on the right. It updates as you type.
  3. Click “Copy HTML” or “Download HTML” to take the converted HTML.

Markdown is the plain-text format used in README files, GitHub issues, wikis, note apps and many blogs. This page lets you check how a document will look before you publish it, or turn Markdown into HTML that you can paste into a CMS or an email template. The preview refreshes a moment after you stop typing.

Rendering uses markdown-it 12.3.2 with HTML, line breaks and auto-linking turned on, plus the markdown-it-emoji plugin. Because line breaks are on, a single Enter becomes a <br>; strict CommonMark and many sites would join those lines into one paragraph, so the result can differ from where you finally post it. Code blocks are colored by highlight.js 11.4.0, which bundles 34 common languages; code in other languages is shown without color.

Everything passes through DOMPurify 3.2.6 before it is shown or copied, so scripts and event attributes in pasted HTML are stripped. The download is an HTML fragment without styles, ready to drop into a page that has its own CSS. Your text is converted in the browser and is not uploaded, but images you reference by URL are loaded from their own servers, as on any web page.

Use cases & tips

Checking a README before you commit

Paste your README and look at the right pane before you push. A table written as | name | role | over a |---|---| separator should appear as a real table, and a fenced block that starts with ```js should be colored. If the table shows up as plain text, the usual cause is a missing separator row or a blank line before the table. Catching this here is quicker than committing, waiting for the page to render and committing again.

The line break surprise

In this preview a single Enter becomes a line break, because the renderer has that option on. Many other places, including strict CommonMark renderers, join the two lines into one paragraph, so the same text can look different once published. If your target is not forgiving, separate paragraphs with a blank line, or end a line with two spaces when you really want a break inside a paragraph. Then the text reads the same in both worlds.

Three ways to take the result

Copy HTML gives a clean fragment with no styles, which fits a CMS field or an email template that brings its own CSS. Export HTML page produces a standalone document with styles included, handy to send to someone who has no Markdown tool. Save as PDF opens the print dialog so you can choose Save as PDF. The three themes change only how the preview and these exports look, not the Markdown itself. The contents panel and the reading-time count help with long posts.

Limits to keep in mind

Images are fetched by their URL from other servers, and a relative path such as ./img/chart.png points to nothing on this page, so use a full address. Pasted HTML is cleaned, so a script tag or an onclick attribute will not survive in the preview or in the copied output. Code in languages outside the 34 bundled ones appears uncolored. The text is not sent anywhere, so use Save .md before you close the tab.

Frequently asked questions

Which Markdown syntax is supported?

CommonMark via markdown-it, plus tables, strikethrough (~~text~~), emoji shortcodes like :smile:, and automatic links for bare URLs. A single line break becomes <br>.

Can I use HTML inside Markdown?

Yes. Raw HTML is allowed, but the output is cleaned with DOMPurify: <script> tags, on… event attributes and javascript: links are removed, so nothing in the text can run.

Are code blocks highlighted?

Yes. Fenced code blocks are colored with highlight.js. Add a language after the backticks (```js) or let it detect the language.