GreyScript AI

Markdown to HTML Converter

Convert Markdown to clean HTML: a complete styled page, or just the body to paste into a CMS. The output is sanitised, and nothing leaves your browser.

1. Your Markdown
2. Export
Used for the file name, the Word document properties and the HTML title.
Supports GitHub-flavoured Markdown: headings, bold, italics, strikethrough, links, lists, task lists, tables, block quotes and code blocks. The HTML is sanitised, so scripts in the Markdown never run. Word files list images as placeholders because the browser cannot fetch most images from other sites. PDF export uses your browser's print dialog; choose "Save as PDF".

How Markdown to HTML conversion works

The Markdown is parsed with marked using GitHub-flavoured Markdown, so tables, task lists, strikethrough and fenced code blocks are supported. The HTML is then sanitised with DOMPurify, which removes scripts, event handlers and javascript: links, so the output is safe to publish even if the Markdown came from someone else.

Details worth knowing

Fenced code blocks keep their language as a class, such as class="language-json", so a syntax highlighter on your site can style them. Headings are not given id attributes. Images keep their original URLs.

Questions and answers

Is the generated HTML safe to publish?

Yes. It is sanitised with DOMPurify, so scripts, inline event handlers and javascript: links in the Markdown are removed.

Can I get just the HTML without the page wrapper?

Yes. Untick the full page option to download or copy only the body HTML, ready for a CMS or template.

Does it add syntax highlighting?

No, but fenced code blocks keep a language class such as language-python, which highlighters like Prism or highlight.js use.