Markdown to HTML Converter - GitHub-Flavored avatar

Markdown to HTML Converter - GitHub-Flavored

Pricing

$0.01 / 1,000 html conversions

Go to Apify Store
Markdown to HTML Converter - GitHub-Flavored

Markdown to HTML Converter - GitHub-Flavored

Convert Markdown text or public Markdown URLs into embeddable HTML fragments or complete HTML documents. Get generated HTML, a download link, heading anchors, a document outline, and rendering choices in your dataset.

Pricing

$0.01 / 1,000 html conversions

Rating

0.0

(0)

Developer

Maxime Dupré

Maxime Dupré

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Share

📝 Markdown to HTML for docs and pages

Developers, docs teams, and automation builders can turn Markdown into an embeddable HTML fragment or a complete HTML document. Submit Markdown text or a public Markdown URL and get generated HTML, a download link, heading anchors, a document outline, and rendering choices in your dataset.

Try these workflows

📦 HTML conversion results

Each successful conversion is saved as one dataset row. The row keeps the submitted source, generated HTML, a downloadable HTML file, the heading outline, content sizes, and the rendering choices used for that conversion. URL sources also include the final URL after redirects.

▶️ Choose a Markdown source and result

  1. Choose whether to use Markdown documents or public Markdown URLs.
  2. Choose an embeddable fragment or a standalone HTML document.
  3. Fill the matching source field. For a URL choice, use a public URL that returns Markdown.
  4. Set the optional title, theme, CSS, Markdown dialect, or code highlighting options.
  5. Run the Actor and open the default dataset to view the HTML and its metadata.

⚙️ Input

The input form lets you choose the source type and the HTML shape. Fields that do not match your result type are ignored.

Input fields

FieldTypeWhat it does
resultTypestringChooses Markdown documents or public Markdown URLs, and an embeddable fragment or standalone HTML document.
markdownDocumentsarray of stringsOne or more Markdown documents for the two Markdown content choices. Each item creates one result. Ignored for URL choices.
markdownDocuments[]stringOne Markdown document.
markdownUrlsarray of objectsOne or more public URLs that return Markdown for the two URL choices. Each item creates one result. Ignored for Markdown choices.
markdownUrls[].urlstringOne public URL that returns Markdown.
documentTitlestringSets the title of a standalone HTML document. Ignored for fragments.
presentationThemestringChooses the built-in theme or an unstyled standalone document. Ignored for fragments.
customCssstringAdds CSS to a standalone document. Leave it empty to use only the selected theme. Ignored for fragments.
markdownDialectstringChooses GitHub-Flavored Markdown or standard Markdown behavior.
syntaxHighlightingbooleanHighlights fenced code blocks when a language is supplied.

Input example

This example is copied from the successful default-input QA run:

{
"resultType": "markdownFragment",
"markdownDocuments": [
"# Hello\n\nThis is a Markdown document."
],
"presentationTheme": "default",
"markdownDialect": "github",
"syntaxHighlighting": false
}

🧾 Output

The tables below cover the four output shapes defined by the public dataset schema. A genuine current-beta row follows each shape when one is available.

Markdown source to an embeddable fragment

FieldTypeWhat it does
sourceobjectDescribes the submitted Markdown source.
source.typestringSource type, markdown.
source.valuestringSubmitted Markdown content.
htmlstringGenerated embeddable HTML fragment.
downloadUrlstringApify storage URL for the generated HTML file.
outlinearrayHeadings in document order.
outline[].levelnumberHeading level from 1 to 6.
outline[].textstringVisible heading text.
outline[].anchorstringUnique anchor used to link to the heading.
contentSizeobjectMeasured source and HTML sizes.
contentSize.sourceBytesnumberSize of the source content in bytes.
contentSize.htmlBytesnumberSize of the generated HTML in bytes.
renderingobjectRendering choices used for the conversion.
rendering.formatstringHTML shape, fragment.
rendering.markdownDialectstringMarkdown behavior used, github or standard.
rendering.syntaxHighlightingbooleanWhether code highlighting was enabled.

Genuine current-beta row

{
"source": {
"type": "markdown",
"value": "# Hello\n\nThis is a Markdown document."
},
"html": "<h1 id=\"hello\"><a class=\"anchor\" href=\"#hello\">#</a>Hello</h1>\n<p>This is a Markdown document.</p>\n",
"outline": [
{
"level": 1,
"text": "Hello",
"anchor": "hello"
}
],
"rendering": {
"format": "fragment",
"markdownDialect": "github",
"syntaxHighlighting": false
},
"contentSize": {
"sourceBytes": 37,
"htmlBytes": 99
},
"downloadUrl": "https://api.apify.com/v2/key-value-stores/ID7HbRGxi1c8mmIrb/records/markdown-1-5a516c8638953a14.html?signature=zDUriazGvtf3sYOHILaT"
}

Public Markdown URL to an embeddable fragment

FieldTypeWhat it does
sourceobjectDescribes the public Markdown URL.
source.typestringSource type, url.
source.valuestringSubmitted public Markdown URL.
source.finalUrlstringURL reached after redirects.
htmlstringGenerated embeddable HTML fragment.
downloadUrlstringApify storage URL for the generated HTML file.
outlinearrayHeadings in document order.
outline[].levelnumberHeading level from 1 to 6.
outline[].textstringVisible heading text.
outline[].anchorstringUnique anchor used to link to the heading.
contentSizeobjectMeasured source and HTML sizes.
contentSize.sourceBytesnumberSize of the source content in bytes.
contentSize.htmlBytesnumberSize of the generated HTML in bytes.
renderingobjectRendering choices used for the conversion.
rendering.formatstringHTML shape, fragment.
rendering.markdownDialectstringMarkdown behavior used, github or standard.
rendering.syntaxHighlightingbooleanWhether code highlighting was enabled.

Genuine current-beta row

{
"source": {
"type": "url",
"value": "https://raw.githubusercontent.com/markedjs/marked/master/README.md",
"finalUrl": "https://raw.githubusercontent.com/markedjs/marked/master/README.md"
},
"html": "<a href=\"https://marked.js.org\">\n \n</a>\n\n<h1 id=\"marked\"><a class=\"anchor\" href=\"#marked\">#</a>Marked</h1>\n<p><a href=\"https://www.npmjs.com/package/marked\"></a>\n<a href=\"https://packagephobia.now.sh/result?p=marked\"></a>\n<a href=\"https://www.npmjs.com/package/marked\"></a>\n<a href=\"https://github.com/markedjs/marked/actions\"></a>\n<a href=\"https://snyk.io/test/npm/marked\"></a>\n<a href=\"https://inspect.software/software/markedjs/marked\"></a></p>\n<ul>\n<li>⚡ built for speed</li>\n<li>⬇️ low-level compiler for parsing markdown without caching or blocking for long periods of time</li>\n<li>⚖️ light-weight while implementing all markdown features from the supported flavors &amp; specifications</li>\n<li>🛠️ easily adaptable with <a href=\"https://marked.js.org/using_advanced#extensions\">custom extensions</a></li>\n<li>🌐 works in a browser, on a server, or from a command line interface (CLI)</li>\n</ul>\n<h2 id=\"demo\"><a class=\"anchor\" href=\"#demo\">#</a>Demo</h2>\n<p>Check out the <a href=\"https://marked.js.org/demo/\">demo page</a> to see Marked in action ⛹️</p>\n<h2 id=\"docs\"><a class=\"anchor\" href=\"#docs\">#</a>Docs</h2>\n<p>Our <a href=\"https://marked.js.org\">documentation pages</a> are also rendered using marked 💯</p>\n<p>Also read about:</p>\n<ul>\n<li><a href=\"https://marked.js.org/using_advanced\">Options</a></li>\n<li><a href=\"https://marked.js.org/using_pro\">Extensibility</a></li>\n</ul>\n<h2 id=\"compatibility\"><a class=\"anchor\" href=\"#compatibility\">#</a>Compatibility</h2>\n<p><strong>Node.js:</strong> Only <a href=\"https://nodejs.org/en/about/releases/\">current and LTS</a> Node.js versions are supported. End of life Node.js versions may become incompatible with Marked at any point in time.</p>\n<p><strong>Browser:</strong> <a href=\"https://developer.mozilla.org/en-US/docs/Glossary/Baseline/Compatibility\">Baseline Widely Available</a></p>\n<h2 id=\"installation\"><a class=\"anchor\" href=\"#installation\">#</a>Installation</h2>\n<p><strong>CLI:</strong></p>\n<pre><code class=\"language-sh\">npm install -g marked</code></pre>\n<p><strong>In-browser:</strong></p>\n<pre><code class=\"language-sh\">npm install marked</code></pre>\n<h2 id=\"usage\"><a class=\"anchor\" href=\"#usage\">#</a>Usage</h2>\n<h3 id=\"warning-marked-does-not-sanitize-the-output-html-please-use-a-sanitize-library-like-dompurify-recommended-sanitize-html-or-insane-on-the-output-html\"><a class=\"anchor\" href=\"#warning-marked-does-not-sanitize-the-output-html-please-use-a-sanitize-library-like-dompurify-recommended-sanitize-html-or-insane-on-the-output-html\">#</a>Warning: 🚨 Marked does not <a href=\"https://marked.js.org/using_advanced#options\">sanitize</a> the output HTML. Please use a sanitize library, like <a href=\"https://github.com/cure53/DOMPurify\">DOMPurify</a> (recommended), <a href=\"https://github.com/apostrophecms/sanitize-html\">sanitize-html</a> or <a href=\"https://github.com/bevacqua/insane\">insane</a> on the <em>output</em> HTML! 🚨</h3>\n<pre><code>DOMPurify.sanitize(marked.parse(`&lt;img src=\"x\" onerror=\"alert('not happening')\"&gt;`));</code></pre>\n<p><strong>CLI</strong></p>\n<pre><code class=\"language-bash\"># Example with stdin input\n$ marked -o hello.html\nhello world\n^D\n$ cat hello.html\n&lt;p&gt;hello world&lt;/p&gt;</code></pre>\n<pre><code class=\"language-bash\"># Print all options\n$ marked --help</code></pre>\n<p><strong>Node.js</strong></p>\n<pre><code class=\"language-js\">import { marked } from 'marked';\nconst html = marked.parse('# Marked in Node.js');\nconsole.log(html);</code></pre>\n<p><strong>Browser</strong></p>\n<pre><code class=\"language-html\">&lt;!doctype html&gt;\n&lt;html&gt;\n&lt;head&gt;\n &lt;meta charset=\"utf-8\"/&gt;\n &lt;title&gt;Marked in the browser&lt;/title&gt;\n&lt;/head&gt;\n&lt;body&gt;\n &lt;div id=\"content\"&gt;&lt;/div&gt;\n &lt;script src=\"https://cdn.jsdelivr.net/npm/marked/lib/marked.umd.js\"&gt;&lt;/script&gt;\n &lt;script&gt;\n document.getElementById('content').innerHTML =\n marked.parse('# Marked in the browser\\n\\nRendered by **marked**.');\n &lt;/script&gt;\n&lt;/body&gt;\n&lt;/html&gt;</code></pre>\n<p>or import esm module</p>\n<pre><code class=\"language-html\">&lt;script type=\"module\"&gt;\n import { marked } from \"https://cdn.jsdelivr.net/npm/marked/lib/marked.esm.js\";\n document.getElementById('content').innerHTML =\n marked.parse('# Marked in the browser\\n\\nRendered by **marked**.');\n&lt;/script&gt;</code></pre>\n<h2 id=\"license\"><a class=\"anchor\" href=\"#license\">#</a>License</h2>\n<p>Copyright (c) 2018+, MarkedJS. (MIT License)\nCopyright (c) 2011-2018, Christopher Jeffrey. (MIT License)</p>\n",
"outline": [
{
"level": 1,
"text": "Marked",
"anchor": "marked"
},
{
"level": 2,
"text": "Demo",
"anchor": "demo"
},
{
"level": 2,
"text": "Docs",
"anchor": "docs"
},
{
"level": 2,
"text": "Compatibility",
"anchor": "compatibility"
},
{
"level": 2,
"text": "Installation",
"anchor": "installation"
},
{
"level": 2,
"text": "Usage",
"anchor": "usage"
},
{
"level": 3,
"text": "Warning: 🚨 Marked does not sanitize the output HTML. Please use a sanitize library, like DOMPurify (recommended), sanitize-html or insane on the output HTML! 🚨",
"anchor": "warning-marked-does-not-sanitize-the-output-html-please-use-a-sanitize-library-like-dompurify-recommended-sanitize-html-or-insane-on-the-output-html"
},
{
"level": 2,
"text": "License",
"anchor": "license"
}
],
"rendering": {
"format": "fragment",
"markdownDialect": "github",
"syntaxHighlighting": false
},
"contentSize": {
"sourceBytes": 3505,
"htmlBytes": 4575
},
"downloadUrl": "https://api.apify.com/v2/key-value-stores/YEPnlSehV9CYlBiZE/records/markdown-1-8cd8d17725a79216.html?signature=O9Q1g6hw1xzdnpmQ66S1"
}

Markdown source to a standalone HTML document

FieldTypeWhat it does
sourceobjectDescribes the submitted Markdown source.
source.typestringSource type, markdown.
source.valuestringSubmitted Markdown content.
htmlstringGenerated complete HTML document.
downloadUrlstringApify storage URL for the generated HTML file.
outlinearrayHeadings in document order.
outline[].levelnumberHeading level from 1 to 6.
outline[].textstringVisible heading text.
outline[].anchorstringUnique anchor used to link to the heading.
contentSizeobjectMeasured source and HTML sizes.
contentSize.sourceBytesnumberSize of the source content in bytes.
contentSize.htmlBytesnumberSize of the generated HTML in bytes.
renderingobjectRendering choices used for the conversion.
rendering.formatstringHTML shape, document.
rendering.markdownDialectstringMarkdown behavior used, github or standard.
rendering.syntaxHighlightingbooleanWhether code highlighting was enabled.
rendering.presentationThemestringBuilt-in theme or unstyled presentation.
rendering.documentTitlestringTitle set for the complete document when supplied.
rendering.customCssAppliedbooleanWhether custom CSS was added to the document.

Genuine current-beta row

{
"source": {
"type": "markdown",
"value": "# Styled Guide\n\nA complete document with a fenced code example.\n\n```js\nconst answer = 42;\n```"
},
"html": "<!doctype html>\n<html lang=\"en\"><head><meta charset=\"utf-8\"><title>Markdown Guide</title><style>body { color: #333; }</style></head><body><h1 id=\"styled-guide\"><a class=\"anchor\" href=\"#styled-guide\">#</a>Styled Guide</h1>\n<p>A complete document with a fenced code example.</p>\n<pre><code class=\"language-js\">const answer = 42;</code></pre>\n</body></html>",
"outline": [
{
"level": 1,
"text": "Styled Guide",
"anchor": "styled-guide"
}
],
"rendering": {
"format": "document",
"markdownDialect": "github",
"syntaxHighlighting": false,
"presentationTheme": "unstyled",
"documentTitle": "Markdown Guide",
"customCssApplied": true
},
"contentSize": {
"sourceBytes": 93,
"htmlBytes": 354
},
"downloadUrl": "https://api.apify.com/v2/key-value-stores/djgepJZN7SoeKeHfz/records/markdown-1-0791a98650d1ca3b.html?signature=3AEyKcwirCKshOPXU6gX"
}

Public Markdown URL to a standalone HTML document

FieldTypeWhat it does
sourceobjectDescribes the public Markdown URL.
source.typestringSource type, url.
source.valuestringSubmitted public Markdown URL.
source.finalUrlstringURL reached after redirects.
htmlstringGenerated complete HTML document.
downloadUrlstringApify storage URL for the generated HTML file.
outlinearrayHeadings in document order.
outline[].levelnumberHeading level from 1 to 6.
outline[].textstringVisible heading text.
outline[].anchorstringUnique anchor used to link to the heading.
contentSizeobjectMeasured source and HTML sizes.
contentSize.sourceBytesnumberSize of the source content in bytes.
contentSize.htmlBytesnumberSize of the generated HTML in bytes.
renderingobjectRendering choices used for the conversion.
rendering.formatstringHTML shape, document.
rendering.markdownDialectstringMarkdown behavior used, github or standard.
rendering.syntaxHighlightingbooleanWhether code highlighting was enabled.
rendering.presentationThemestringBuilt-in theme or unstyled presentation.
rendering.documentTitlestringTitle set for the complete document when supplied.
rendering.customCssAppliedbooleanWhether custom CSS was added to the document.

💳 Pricing

Pricing event

The markdown-to-html-conversion event is charged once for each Markdown document successfully converted to HTML. Failed conversions are not charged. The current event price is shown in the Apify pricing panel.

🔌 Integrations

Use the Apify dataset, API, schedules, webhooks, and standard exports to pass generated HTML to another step.

❓ FAQ

Can I convert a Markdown file from a URL?

Yes. Choose a public URL option and submit a URL that returns Markdown. The output keeps the submitted URL and the final URL after redirects. Login-gated or private URLs are outside the scope of this Actor.

What is the difference between a fragment and a document?

A fragment is ready to place inside an existing page. A standalone document includes the HTML document structure and can use a title, a built-in theme or an unstyled presentation, and custom CSS.

Yes. Each heading in the HTML gets a unique anchor, and outline lists its level, text, and anchor. Repeated headings get unique anchors.

Does it sanitize unsafe Markdown HTML?

Unsafe raw HTML and scriptable content are sanitized by default. This is not an audited security boundary for hostile anonymous content, so add your own sanitizer and content security policy when needed.

Can I highlight code?

Yes. Turn on Syntax highlighting. The setting is recorded in rendering.syntaxHighlighting.

Can I convert an ordinary HTML page or a private URL?

No. The URL choices are for public URLs that return Markdown. This Actor does not render browser pages or log in to private sites.

How is pricing counted?

One event covers each Markdown document successfully converted to HTML. Failed conversions are not charged.

📝 Changelog

v0.0 (26-09-2026)

  • Initial release.

🆘 Support

For issues, questions, or feature requests, file a ticket and I'll fix or implement it in less than 24h 🫡

Made with ❤️ by Maxime Dupré