ligHTMetaL::MeltDown
Markdown in. HTML out. No dependencies.
A standalone Markdown parser for browsers and Node.js. Parse headings, nested lists, tasks, tables, links, and code. Raw HTML is escaped by default. Add syntax highlighting through a synchronous code-block hook.
Try it
HTML output
Rendered result
This preview blocks scripts, external resources, and navigation. Parsing itself makes no network requests.
Quickstart: browser script
Copy dist/MeltDown.js beside your page.
<script src="MeltDown.js"></script>
<script>
const html = meltDown.parse('# Hello');
console.log(html); // <h1>Hello</h1>
</script>
Quickstart: ES modules
Copy dist/MeltDown.esm.js. In Node.js, use an ES module context. Serve browser modules over HTTP(S).
import { parse } from './MeltDown.esm.js';
const html = parse('A **bold** idea.');
// <p>A <strong>bold</strong> idea.</p>
Bring your own highlighter
const html = meltDown.parse(markdown, {
highlight(code, language) {
// Return trusted inner HTML from your highlighter.
// Return null to keep the normal escaped code.
return null;
}
});
The hook handles fenced and indented blocks, not inline code. It receives raw code and a language token (or an empty string). It must return synchronously; its HTML is trusted, not sanitized.
Focused by design
MeltDown covers everyday writing: headings, lists, tasks, tables, links, images, and code. Less-used Markdown extensions stay out to keep the parser small and easy to maintain. Write explicit links when you want clickable URLs or email addresses.
Use a maintained HTML sanitizer before inserting output from untrusted documents into your page. Raw HTML is escaped by default; { html: 'allow' } enables pass-through for trusted input. This demo keeps links and external images inactive.