Markdown Preview Online

Write Markdown and see the rendered HTML preview in real time.

MARKDOWN0 chars
Preview

Preview will appear here...

When a Markdown preview is the right tool

README files, comments, and docs are often written in Markdown and read as HTML. This page is for checking that rendering in the browser: paste or type on the left, and the preview on the right updates as you type. You can copy the generated HTML, load a short sample, or switch to a preview-only layout.

The renderer is marked with GFM defaults. If you mainly want a file of HTML to save, the Markdown to HTML converter may be a better fit. To compare two Markdown sources, use Markdown Diff.

Use cases

Checking a README or a comment before you publish it

Headings, lists, links, and GFM tables are easier to judge once they are rendered. Load Sample pastes a short document with emphasis, a JavaScript fence, a table, a blockquote, and a link if you want to see the layout first.

Copying HTML for a CMS that does not accept Markdown

Copy HTML puts marked’s output on the clipboard. Review it first if your Markdown included raw HTML. This is a starting point, not a guaranteed match for GitHub’s or your CMS’s own renderer.

Reading a longer draft

Preview hides the editor so the rendered document can use the full width. Switch back to Split when you need to edit again.

How preview works

When the input is empty or only whitespace, the preview is cleared. Otherwise the text is passed to marked.parse with async: false, using marked’s defaults (GFM on, breaks off). The HTML is written into the preview pane. No syntax highlighter is loaded, and no sanitizer is applied.

Example — a GFM table becomes an HTML table
| Name  | City     |
|-------|----------|
| Alice | New York |

<table>
<thead>
<tr>
<th>Name</th>
<th>City</th>
</tr>
</thead>
<tbody><tr>
<td>Alice</td>
<td>New York</td>
</tr>
</tbody></table>

That is the usual shape for a simple table. Alignment markers in the header separator follow GFM rules. A fenced code block similarly becomes a <pre><code> element with a language class, without colored syntax.

What this tool does not do

It does not highlight code, sanitize HTML, enable GFM line breaks, or export a file. Nothing is sent to a server. To turn existing HTML into Markdown, use HTML to Markdown.

How to use Markdown Preview

  1. Choose Split (editor and preview) or Preview (preview only).
  2. Paste or type Markdown. The preview updates as you type. Load Sample inserts a short demo document.
  3. Use Copy HTML when you want the marked output, or Clear to start over.

Frequently asked questions

Which Markdown flavor does this page use?

It renders with the marked library and its default GitHub Flavored Markdown (GFM) options. Tables, task-list checkboxes, and autolinked URLs work. Single newlines do not become line breaks unless you use two spaces or a blank line, because GFM breaks are off by default.

Does the preview highlight code or sanitize HTML?

No. Fenced blocks are wrapped in a <pre><code class="language-…"> element, but no highlighter runs, so the code is plain text. Raw HTML in the Markdown, including script tags, is passed through to the preview. Only preview documents you trust; this page is not a sanitizer.

What does Copy HTML copy?

The HTML string produced by marked, not a pretty-printed snapshot of the preview pane. If the Markdown contained raw HTML, that markup is included. The button is disabled until there is output.

What is the difference between Split and Preview?

Split shows the editor and the preview side by side (stacked on a narrow screen). Preview hides the editor so you can read the rendered page more widely. Switch back to Split to keep editing. There is no editor-only layout.

Is my Markdown sent to a server?

No. Rendering runs in your browser as you type. Closing the tab discards what you pasted. Because the preview can run raw HTML, do not paste untrusted Markdown that you would not open as a web page on this device.

Is there a file size limit?

There is no server-imposed limit, because nothing is uploaded. A few thousand lines is comfortable. A very large document can make the tab feel slow; in that case, preview a smaller excerpt.

Related tools and guides

References

  • GitHub Flavored Markdown is the dialect marked enables by default, including tables and task lists.
  • The preview is produced by marked. It does not sanitize HTML. Treat the result like any other page that can contain markup you pasted.