Skip to content
My Tiny Utils

Search tools

Type to find a tool, then press Enter to open it.

Markdown to HTML Converter

Convert Markdown to HTML with GitHub-flavored tables and task lists, heading ids, pretty-printed or minified output, and a sanitized live preview.

Processed locally in your browser — nothing is uploaded.

Markdown to HTML Converter

0 characters

HTML

Output appears here…

About Markdown to HTML Converter

Write or paste Markdown and get the HTML to put in a page, an email template, or a CMS field that doesn't speak Markdown. Conversion uses marked with GitHub-flavored Markdown switched on, so tables (with column alignment), strikethrough, task-list checkboxes, fenced code blocks with a language-* class for syntax highlighters, and bare URLs that turn into links all work the way they do on GitHub.

Heading ids for anchor links. Every heading gets an id computed the way GitHub computes them — lower-cased, punctuation removed, spaces turned into hyphens, and repeats numbered -1, -2 — so ## Getting started can be linked as #getting-started and links copied from a GitHub README keep working.

Output the way you need it. Copy or download the HTML as generated, pretty-printed with nested elements indented, or minified onto one line. Switch on Full HTML document to wrap it in a complete page with a doctype, a UTF-8 charset, a mobile viewport, and a title taken from the first heading. Line breaks can become <br> the way GitHub comments treat them.

Safe by default where it matters. The Preview tab is always sanitized with DOMPurify, so a <script> or an onerror handler in the Markdown can't run on this page. Links and images with javascript: URLs are removed from the output too. Markdown allows raw HTML, which is passed through as written unless you choose to escape it into visible text; for Markdown you didn't write, turn on Sanitize the HTML output to run the copied HTML through DOMPurify as well.

Common uses

  • Turn a README or changelog into HTML for a website, release email, or app store listing
  • Write a blog post in Markdown and paste the HTML into a CMS
  • Generate a standalone HTML page from notes or documentation
  • Check exactly which HTML a Markdown snippet produces, including heading anchors

Example

Input

## Install

Run `npm i` — see [docs](/docs).

- [x] Fast
- [ ] Free

Output

<h2 id="install">Install</h2>
<p>Run <code>npm i</code> — see <a href="/docs">docs</a>.</p>
<ul>
<li><input checked="" disabled="" type="checkbox"> Fast</li>
<li><input disabled="" type="checkbox"> Free</li>
</ul>

Limitations

  • GitHub-specific extras that need GitHub's servers — @mentions, issue references, emoji shortcodes like :tada:, and alert boxes like > [!NOTE] — stay as plain text
  • No syntax highlighting is applied; code blocks carry a language-* class for a highlighter like Prism or highlight.js to pick up
  • Pretty-printing collapses runs of whitespace outside pre, textarea, script, and style, which browsers ignore anyway

Frequently asked questions

How do I convert Markdown to HTML?

Paste or type Markdown in the left box and the HTML appears on the right as you type. Copy it or download it as an .html file, and switch to the Preview tab to see it rendered. The Format menu gives you the HTML as generated, pretty-printed, or minified.

Does it support GitHub-flavored Markdown?

Yes, it's on by default: tables with alignment, strikethrough, task lists, fenced code blocks, and automatic links for bare URLs. Switch it off in Options for plain CommonMark-style output. Features that depend on GitHub itself — mentions, issue links, emoji shortcodes, and alert blocks — aren't converted.

How are heading ids generated?

The same way GitHub does it: the heading text is lower-cased, punctuation is removed, spaces become hyphens, and a heading that repeats an earlier one gets -1, -2, and so on. So “What's new?” becomes #whats-new, matching GitHub's anchors. You can turn ids off in Options.

Is the HTML output safe to put on my site?

Markdown allows raw HTML, so whatever HTML was in the Markdown is passed through by default, while javascript: links are always removed. If the Markdown came from someone else, turn on “Sanitize the HTML output” to strip scripts and event handlers with DOMPurify, or escape raw HTML so it shows as text. The live preview is always sanitized.

Can I get a complete HTML page instead of a fragment?

Yes. Turn on Full HTML document in Options to wrap the result in <!doctype html> with a UTF-8 charset, a responsive viewport tag, and a <title> taken from the first heading. Combine it with Pretty-printed to get a readable, indented file to download.

Why don't single line breaks show up in the HTML?

In standard Markdown a single line break inside a paragraph is just a space; you need a blank line for a new paragraph or two trailing spaces for a line break. GitHub comments and many chat apps treat every line break as a break — switch on “Line breaks become <br>” in Options for that behaviour.

Is my Markdown uploaded anywhere?

No. Conversion, formatting, and sanitizing all happen in your browser, and nothing you type is sent to a server or saved.