Skip to content
UniKit

Markdown to HTML

Convert Markdown to HTML in real time: GFM tables, task lists, strikethrough and fenced code, with raw-HTML, line-break and heading-id switches plus a DOMPurify-sanitized preview.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Markdown source
Options

Live preview

The preview is sanitized with DOMPurify; the output source keeps the raw markup.

<h1 id="unikit">UniKit</h1> <p>A purely client-side toolbox where <strong>everything runs locally</strong>.</p> <ul> <li><input checked="" disabled="" type="checkbox"> Markdown parsing</li> <li><input disabled="" type="checkbox"> HTML export</li> </ul> <table> <thead> <tr> <th>Category</th> <th>Count</th> </tr> </thead> <tbody><tr> <td>All</td> <td>200+</td> </tr> </tbody></table> <pre><code class="language-js">const unikit = true; </code></pre>

HTML output

Output bytes: 450
<h1 id="unikit">UniKit</h1>
<p>A purely client-side toolbox where <strong>everything runs locally</strong>.</p>
<ul>
<li><input checked="" disabled="" type="checkbox"> Markdown parsing</li>
<li><input disabled="" type="checkbox"> HTML export</li>
</ul>
<table>
<thead>
<tr>
<th>Category</th>
<th>Count</th>
</tr>
</thead>
<tbody><tr>
<td>All</td>
<td>200+</td>
</tr>
</tbody></table>
<pre><code class="language-js">const unikit = true;
</code></pre>

Statistics

Characters198
Words (CJK counted per character)22
Lines14
Headings1
Links0
Images0
Code blocks1
Inline code0
Tables1
Task items1/2
Output bytes450

Heading outline

  • #unikitUniKit

What this tool does

  • Turn a Markdown README, doc or email body into HTML you can paste into a CMS, email template or static page.
  • Preview while writing: the preview pane is sanitized with DOMPurify, so you see how tables, task lists, strikethrough and fenced code really render.
  • Get heading anchors for free: heading ids are on by default, keeping letters and digits and turning spaces into hyphens (# UniKit tools becomes id="unikit-tools") for tables of contents.
  • Screen raw HTML inside Markdown by turning "Allow raw HTML" off, which escapes <div> or <script> into visible text instead of rendering it.

Example

Input

# UniKit

A purely client-side toolbox where **everything runs locally**.

Output

<h1 id="unikit">UniKit</h1>
<p>A purely client-side toolbox where <strong>everything runs locally</strong>.</p>

GFM and heading ids are on by default; line-break conversion and raw HTML are off. The trailing newline comes from marked's paragraph rendering.

Frequently asked questions

Why can the preview differ from the output source?

The output pane is the raw HTML marked produced; the preview runs it through DOMPurify to strip scripts and event attributes. Copy from the output pane when you need the markup elsewhere — the preview guarantees safety, not byte-for-byte equality.

What happens when "Allow raw HTML" is off?

HTML tags written directly in the Markdown are escaped into text (<div> shows as &lt;div&gt;) and only tags produced by Markdown syntax are rendered. That is the safe default for untrusted content.

How are heading ids generated?

The heading text is lowercased, HTML tags are stripped, spaces become hyphens, and only letters, digits, hyphens and CJK characters are kept — other punctuation is dropped. Duplicate ids in one document get -1, -2 suffixes so anchors stay unique.

Which Markdown extensions are supported?

GFM is on by default: tables, task lists (- [x]), strikethrough (~~text~~), fenced code blocks and autolinks. Single newlines do not become <br> unless you enable line-break conversion, which then breaks lines the way GitHub soft breaks do.

Is my Markdown uploaded anywhere?

No. Parsing and previewing run entirely in your browser with no network requests, and it works offline.

Keywords:markdownmdhtmlgfmmarkedconverterMarkdown 转换Markdown 转 HTML表格任务列表

Related tools