GitHub-flavoured Markdown to a styled, self-contained HTML document.
markdown_to_html
convertfree
Full GFM: tables, task lists, strikethrough, fenced code, footnotes.
Output is a single self-contained file — the stylesheet is inlined, nothing is fetched from a CDN — so it renders identically offline, inside an email client, or as the input to html-to-pdf.
sanitize (on by default) strips <script>, on* handlers and javascript: URLs, which matters when
the Markdown came from a model or an untrusted user.
| Parameter | Type | Default | Description |
|---|---|---|---|
| markdown * | string | — | Markdown source. |
| theme | `clean` | `github` | `print` | `minimal` | `none` | "clean" |
Built-in stylesheet. |
| title | string | — | Document <title>. Defaults to the first heading. |
| fullDocument | boolean | true |
Emit a complete <html> document. Off returns just the body fragment. |
| sanitize | boolean | true |
Remove scripts, event handlers and javascript: URLs. |
| toc | boolean | false |
Prepend a table of contents built from the headings. |
HTML document. Request JSON output to get it as a string field.