Markdown Preview

Type or paste Markdown on the left and watch the safely rendered HTML preview update instantly on the right — no sign-up, nothing leaves your browser.

Live preview

Start typing Markdown on the left — the safely rendered preview appears here.

Markdown cheat sheet: every syntax this previewer supports

This tool is a small, hand-written Markdown parser — not a wrapper around a third-party library. It recognizes the Markdown syntax people actually use day to day and converts it into clean, semantic HTML in real time as you type. The table below doubles as a quick reference for the whole syntax it understands.

ElementMarkdown syntaxRenders as
Heading# H1###### H6<h1><h6>
Bold**bold** or __bold__<strong>
Italic*italic* or _italic_<em>
Strikethrough~~gone~~<del>
Link[text](url "title")<a href>
Image![alt](url)<img>
Inline code`code`<code>
Code block```lang … ```<pre><code>
Blockquote> quoted text<blockquote>
Horizontal rule---<hr>
Unordered list- item<ul><li>
Ordered list1. item<ol><li>
Nested listindent 2+ spaces under an itemnested <ul>/<ol>
Table| a | b | + | - | - |<table>

How this Markdown to HTML converter stays XSS-safe

Before a single character of Markdown syntax is interpreted, the entire input is HTML-escaped — every <, >, &, " and ' becomes a safe entity. Only after that does the parser scan for Markdown tokens like **, # or [...]( ... ), and it always builds the output by wrapping recognized tokens in its own fixed set of tags. There is no step where raw HTML you typed is copied through to the page. Paste a script tag or an onerror attribute into the editor and it prints as visible text in the preview instead of running — the same way a syntax-highlighted code sample would.

Worked examples

Example 1 — mixed inline formatting. Typing Use **bold**, _italic_ and `code` together. renders as: Use bold, italic and code together.

Example 2 — a two-level nested list. Typing a bullet, then an indented bullet on the next line, then a third top-level bullet produces a proper nested <ul> inside the middle <li> — useful for outlines, meeting notes and README sections.

Example 3 — an attempted injection. Typing Hi <script>alert(1)</script> renders as the literal text "Hi <script>alert(1)</script>" in the preview — nothing executes, because the escape happens before any tag is ever built.

Common Markdown mistakes this tool helps you avoid

Sources & further reading

Frequently asked questions

What Markdown syntax does this online Markdown previewer support?

This tool is a hand-written Markdown renderer covering the syntax people use every day: headings (# through ######), bold, italic and ~~strikethrough~~ text, [links](example.com) and images, inline `code` and fenced code blocks, blockquotes, horizontal rules, ordered and unordered lists (including nested lists), and GitHub-style pipe tables. Anything it doesn't recognize is left as plain text rather than guessed at, so the output stays predictable.

Is it safe to paste HTML or script tags into the Markdown editor?

Yes. Before any Markdown syntax is parsed, the entire input is HTML-escaped, so characters like <, > and & are converted to safe entities first. The renderer then only builds HTML tags for the Markdown tokens it recognizes — it never lets raw HTML pass through. If you paste a script tag into the editor, the preview shows that text on the page instead of running it, which is what keeps this Markdown to HTML converter safe to use on untrusted notes.

How do I copy the rendered HTML output?

Click "Copy HTML" above the preview pane. It copies the exact HTML markup the previewer generated — the same tags you see rendered, including headings, lists and tables — straight to your clipboard, ready to paste into a CMS, email or static site.

Does this Markdown editor support GFM tables and nested lists?

Yes. Type a header row, a separator row made of dashes (optionally with colons for alignment, like :---, ---: or :---:), and one or more data rows separated by pipes to get a table. For lists, indent a line by two or more spaces under a bullet or numbered item to nest a sub-list underneath it — the previewer renders the nesting as nested lists inside the parent item.

Is my Markdown text saved or sent to a server?

No. Everything runs locally in your browser — typing, parsing and rendering all happen on your device. The only storage used is your browser's localStorage, purely so your draft is still there if you reload the page; nothing is uploaded, and there's no sign-up or tracking.