Live Markdown rendering with GFM and syntax highlighting
function hello() {
console.log("Hello, world!");
}
| Name | Value |
|---|---|
| A | 1 |
| B | 2 |
Markdown is the lightweight syntax used across GitHub, Reddit, Discord, and most static-site generators. You write ASCII like '# Heading' and '**bold**', and the renderer turns it into HTML.
This previewer renders your Markdown live as you type, with GitHub-Flavored Markdown extensions (tables, task lists, strikethrough, autolinks, fenced code blocks with syntax highlighting). Copy the rendered HTML to paste anywhere a rich-text field lives.
# Title
- Item 1
- Item 2
```js
console.log("hi");
```<h1>Title</h1>
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<pre><code class="language-js">console.log("hi");
</code></pre>GitHub-Flavored Markdown (GFM) — tables, task lists ([ ] / [x]), strikethrough (~~text~~), fenced code blocks, autolinks, and footnotes. CommonMark is the base; GFM adds the practical extensions.
Most common ones — JavaScript, TypeScript, Python, Go, Rust, Java, C/C++, SQL, JSON, YAML, shell, HTML, CSS, and more. Specify the language after the opening fence (```js).
It's sanitized to strip <script> and other obvious XSS vectors, but you should still treat it as trusted only if the input was trusted. For untrusted user content, run a server-side sanitizer (DOMPurify, sanitize-html) before publishing.
Image URLs in the preview will be fetched by your browser to render. Be aware: if you preview a Markdown doc with private/internal image URLs, the request goes from your browser. Links don't auto-load.
Not currently. Add KaTeX or Mermaid in your downstream renderer if needed — they're not part of standard GFM.