Preview Markdown with marked + DOMPurify
To preview Markdown online, paste it into a browser pane that parses with marked and sanitizes with DOMPurify. Docify's right column updates on every textarea change. Load sample preview is <h1>Welcome to Markdown</h1> plus <strong>bold text</strong>, <em>italic text</em>, a Features list, a language-javascript fence with function hello(), <a href="https://example.com">Docify</a>, and a blockquote. That preview is HTML, not a PDF proof. Nothing is uploaded.
A .md file is plain text. A preview is just that text run through a Markdown parser and shown as HTML. The live Markdown converter does that locally so you can catch broken lists or links before you copy the fragment out.
How to preview Markdown in three steps
Step 1: Put the source on the left
Paste from an editor or notes. The tool does not open files from disk. Load sample fills # Welcome to Markdown, a bold/italic paragraph, a Features list, a javascript fence, [Docify](https://example.com), and a blockquote. The pane updates as-you-type. Load sample does not run Download PDF.
Step 2: Watch the right-hand pane
Open the Docify Markdown converter. The preview is a scrollable HTML region ( dangerouslySetInnerHTML on the sanitized string). It is not a print layout.
Step 3: Copy HTML if the preview looks right
Copy HTML or Download HTML export the same sanitized fragment the pane shows. Download PDF is a different, text-only path — see the PDF guide.
What the preview is and is not
Sanitized HTML, restyled by this site
The pane applies Docify's prose classes. Downloaded HTML does not include those styles. If a heading looks larger here than in your app, that is CSS, not a different parse.
No syntax highlighting
Fenced code becomes ordinary pre / code from marked. Load sample's javascript fence is <pre><code class="language-javascript"> with function hello(). There is no Prism, highlight.js, or language coloring.
Images stay as tags
An image line such as  becomes an img if DOMPurify keeps it. The converter does not upload, resize, or proxy the file. Broken remote URLs show as broken images.
Preview Markdown in the browser
Live marked + DOMPurify pane. Copy the sanitized HTML when it looks right. Nothing is uploaded.
Use Markdown Converter →FAQ
- Does the Markdown preview upload my text?
- No. The preview updates in your browser as the textarea changes. The page does not send the text to a server.
- How live is the preview?
- A React effect re-runs whenever the left-hand Markdown string changes. It calls marked (v11, gfm true), then DOMPurify.sanitize, and writes the cleaned HTML into the right-hand pane. There is no separate Preview button. Load sample fills # Welcome to Markdown plus a bold/italic paragraph, a Features list, a javascript fence, [Docify](https://example.com), and a blockquote. The pane then writes <h1>Welcome to Markdown</h1>, <strong>bold text</strong>, <em>italic text</em>, a three-item <ul>, <pre><code class="language-javascript"> with function hello(), <a href="https://example.com">Docify</a>, and a <blockquote>. Headings stay bare — marked v11 defaults do not add header ids.
- Is this the same as GitHub or VS Code preview?
- No. Rendering follows marked v11 defaults (GitHub-flavored options on) plus DOMPurify, and the pane uses this site’s prose styles. Theme, extensions, and Mermaid or math plugins from those editors are not present.
- Can I open a .md file from disk?
- Not on this page. Paste the file contents into the textarea. There is no Markdown file picker. Load sample fills # Welcome to Markdown and updates the HTML pane. It does not run Download PDF.