Markdown Preview and Sanitized HTML Converter

FormattingRuns in Your Browser (No Uploads)

Preview Markdown and convert it to sanitized HTML in your browser. Review tables, task lists, highlighted code, KaTeX math, footnotes, definition lists, and safe raw HTML without uploading the document text.

What to do next

Continue with a related workflow or open the next tool that usually follows this task.

How to Use This Tool

Paste Markdown or load the sample document in the input editor.

Leave remote images disabled unless you trust every referenced image host and intend to contact it.

Use Live mode for short edits or Manual mode for larger documents.

Compare the rendered preview with the HTML output, especially tables, task lists, code, math, and raw HTML.

Review any blocked-image, size, or conversion warning before exporting.

Copy or download the sanitized HTML fragment, then test it with the styles and HTML policy of the destination.

When to Use This Tool

README and repository documentation

Check headings, lists, tables, code fences, and relative images before committing a README or documentation update.

Technical writing with code and math

Draft technical notes with highlighted code, equations, footnotes, and collapsible details while keeping the source in the browser.

Markdown-to-HTML handoff

Inspect the generated HTML fragment and identify elements that need destination-specific styling or policy review.

Markdown syntax practice

Experiment with supported syntax while seeing both the rendered result and the sanitized markup.

Common Mistakes

Expecting an exact GitHub rendering match

The renderer supports many familiar Markdown extensions, but it is not GitHub's parser. Mentions, issue references, emoji shortcodes, heading IDs, and some edge cases can render differently.

Loading remote images without checking the host

Remote HTTP(S) images are blocked by default. Enabling them sends requests to every image host in the document, which can expose an IP address and request metadata.

Treating sanitization as permission to publish anything

Unsafe tags, event handlers, active URL schemes, media, and forms are removed here, but a CMS may transform the exported fragment again. Review the destination's own HTML policy.

Assuming the HTML fragment includes site styling

The copied output contains sanitized content markup, not your website theme. Code colors, table spacing, typography, and KaTeX presentation still depend on styles in the destination.

Keeping live mode on for a very large document

Repeated parsing and syntax detection can make typing feel slow. Use Manual mode for large files and split unusually complex math or code sections when necessary.

Examples

Review a release checklist and table

Confirm headings, task states, table alignment, and a footnote before moving release notes into a repository or documentation system.

Input
# Release checklist

- [x] Run tests
- [ ] Publish notes

| Check | Result |
| --- | ---: |
| Accessibility | Pass |

See the review log.[^1]

[^1]: Reviewed on a staging build.
Output
<h1>Release checklist</h1>
<ul class="contains-task-list">...</ul>
<table>...</table>
<section class="footnotes">...</section>

Preview code and a math expression

Use a fenced language hint for code highlighting and KaTeX delimiters for an equation, then inspect the sanitized HTML fragment.

Input
## Estimate

```ts
const total = price * quantity;
```

$E = mc^2$
Output
<h2>Estimate</h2>
<pre><code class="language-ts">...</code></pre>
<p><span class="katex">...</span></p>

How Markdown rendering and sanitization work

Markdown is parsed into HTML with markdown-it and selected plugins for task lists, tables, footnotes, definition lists, syntax highlighting, and KaTeX math.

This is a compatibility-focused preview rather than GitHub's own renderer. GitHub-specific references, emoji shortcodes, generated heading IDs, and edge-case output may differ.

DOMPurify is the final trust boundary. It removes executable tags and attributes, restricts links, strips unsafe resource types, limits KaTeX inline styles, and blocks remote images unless you opt in.

Frequently Asked Questions

Does this render exactly like GitHub Flavored Markdown?

No. It supports common features such as tables, task lists, strikethrough, fenced code, and autolinks, plus footnotes, definition lists, and KaTeX. It does not promise GitHub-identical output or every GitHub-specific extension.

Does the tool upload my Markdown?

The Markdown parser and sanitizer run in your browser, and the document text is not sent for conversion. Relative images may request this site's paths. Remote HTTP(S) images are blocked unless you explicitly enable them.

How are images and links handled?

Safe links remain clickable and open in a new tab with noreferrer protection. Relative, blob, and safe raster data images can render. Remote HTTP(S) images require the off-by-default setting; SVG data URLs and unsafe schemes are removed.

Can I include raw HTML safely?

A limited safe subset can remain, including details, summary, tables, mark, and task-list inputs. Scripts, styles outside KaTeX, event handlers, iframes, embedded media, forms, and dangerous URLs are removed.

What does the downloaded output contain?

It contains the sanitized HTML fragment generated from the Markdown. Add the destination's document wrapper and CSS, and review its publishing policy before using the fragment in a website or CMS.

How This Tool Was Verified

Maintained and tested by Reviewed

Method: This check paired the exact “Review a release note with a task list, table, and footnote” input with Markdown Preview & Sanitized HTML Converter. We followed “Remove private and environment-specific data”, captured the result after “Preview structure before appearance”, and compared it with the example while treating “Calling compatibility an exact rendering guarantee” and “Reviewing only the visual pane” as explicit boundary questions.

Expected result: The preview contained one h1, disabled task boxes, a right-aligned table column, and a linked footnote; the final check also confirmed that no staging URL remained.

Sources and standards

Open the tested workflow

Related workflow guides

Use these focused guides when you need a practical workflow before opening the tool.

Workflow guide

Convert CSS colors and verify text contrast

Use a color converter to create reviewable sRGB values, but make the final decision in context: preserve the source token, resolve transparency against the real backdrop, test every state, and keep profile-free CMYK estimates out of press-ready files.

Workflow guide

Convert CSV or JSON to a Markdown table without corrupting data

A documentation table is reliable only when its source shape, conversion rules, and published rendering agree. This workflow starts with a scrubbed representative fixture, distinguishes quoted CSV from strict JSON object arrays, protects large numbers and nested values, checks every generated header and padded cell, and verifies the finished GFM with the exact renderer that will publish it.

Workflow guide

Preview Markdown safely before publishing a README or article

A Markdown preview is most useful as a review stage, not as a promise that every destination will render the same document. This workflow keeps the working text in the browser, checks common extended syntax and sanitized raw HTML, treats remote images as an explicit privacy decision, and separates content markup from destination styling. It finishes by testing the exported HTML fragment or original Markdown in the system that will actually publish it.

Workflow guide

Convert an HTML article to GFM Markdown and verify it before publishing

HTML-to-Markdown conversion can remove repetitive rewriting, but a publishable migration also needs content isolation, trust-boundary review, asset relocation, and a real destination preview. This workflow converts one article or documentation section, checks every removed or preserved structure, replaces unsafe links and interactive controls, moves images, and verifies the finished file with the renderer that will actually publish it.

Related Tools

Continue with another maintained workflow

Browse All Tools