How the Markdown to HTML Converter Works
AnyTool Markdown to HTML parses the source entirely in the browser with markdown-it, a CommonMark-compliant parser, and the GitHub-Flavored Markdown extensions for tables, task lists, strikethrough and autolinking. Fenced code blocks are tokenised and highlighted with Prism, whose language grammars are lazy-loaded on demand. Headings receive GitHub-style slug ids, and an optional table of contents is generated from them. The rendered preview and the raw HTML are produced from the same parse, so they always match.
- Parsing uses markdown-it (CommonMark) with GitHub-Flavored Markdown extensions
- Code blocks are highlighted by Prism with grammars loaded only when needed
- Headings get GitHub-compatible anchor ids and an optional table of contents
- Output can be a self-contained HTML document with inline CSS or a fragment
- All conversion is client-side JavaScript — the Markdown is never uploaded
