Markdown to HTML Converter — GFM, Tables & Syntax avatar

Markdown to HTML Converter — GFM, Tables & Syntax

Pricing

from $1.95 / 1,000 document converteds

Go to Apify Store
Markdown to HTML Converter — GFM, Tables & Syntax

Markdown to HTML Converter — GFM, Tables & Syntax

Convert Markdown to clean HTML with GitHub-flavored Markdown, tables, task lists, syntax highlighting, sanitization, and downloadable outputs.

Pricing

from $1.95 / 1,000 document converteds

Rating

0.0

(0)

Developer

junipr

junipr

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

6 days ago

Last modified

Share

What does Markdown to HTML Converter — GFM, Tables & Syntax do?

Markdown to HTML Converter transforms Markdown text into styled, ready-to-use HTML. Provide Markdown content directly or point to a URL containing a Markdown file, and the actor produces a complete HTML document with your choice of theme, syntax highlighting for code blocks, and support for GitHub Flavored Markdown features like tables, task lists, and strikethrough text.

The output can be a full HTML document with <!DOCTYPE html> wrapper or a bare HTML fragment for embedding into existing pages. Two built-in themes are available (GitHub and Minimal), plus the option to inject custom CSS. The converted HTML is saved to the key-value store for direct download and also pushed to the dataset with conversion metadata.

Features

  • Two input methods — paste Markdown directly or fetch from a URL
  • Safety caps — default max input size is 100,000 characters, configurable up to 250,000
  • GitHub Flavored Markdown — tables, task lists, strikethrough, autolinks, and line breaks
  • Syntax highlighting — automatic code block highlighting powered by highlight.js with language detection
  • Built-in themes — GitHub theme (clean, modern, familiar) or Minimal theme (serif, reading-focused)
  • Custom CSS — inject additional CSS for branding or custom styling
  • Fragment or document — output a complete HTML page or just the HTML body fragment
  • Safe zero-config input — runs with a bounded project-status document if no input is provided
  • HTML sanitization — removes scripts, event handlers, and scriptable URLs from raw HTML by default
  • Direct download — HTML output saved to key-value store as a downloadable file
  • Pay-per-conversion pricing — charged per document converted

Input Configuration

{
"markdown": "# Hello World\n\nThis is **bold** and *italic* text.\n\n```javascript\nconsole.log('Hello!');\n```",
"markdownUrl": "",
"maxMarkdownCharacters": 100000,
"theme": "github",
"includeStyles": true,
"syntaxHighlight": true,
"wrapInHtmlDocument": true,
"gfm": true,
"sanitize": true,
"customCss": ""
}
ParameterTypeDefaultDescription
markdownstring""Raw Markdown text to convert. Takes priority over markdownUrl.
markdownUrlstring""URL to a Markdown file to fetch and convert
maxMarkdownCharactersinteger100000Maximum markdown characters per run, capped at 250,000
themestring"github"CSS theme: github, minimal, or none
includeStylesbooleantrueInclude CSS styles in the output
syntaxHighlightbooleantrueEnable code block syntax highlighting
wrapInHtmlDocumentbooleantrueWrap output in a complete HTML document. Set to false for HTML fragment.
gfmbooleantrueEnable GitHub Flavored Markdown (tables, task lists, strikethrough)
sanitizebooleantrueRemove unsafe raw HTML and attributes from the converted Markdown body
customCssstring""Additional CSS to append to the output

Output Format

The dataset contains conversion metadata and the full HTML output:

{
"inputLength": 245,
"outputLength": 1847,
"theme": "github",
"syntaxHighlight": true,
"gfm": true,
"sanitized": true,
"wrapInHtmlDocument": true,
"html": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>...</head>\n<body>\n<article class=\"markdown-body\">\n<h1>Hello World</h1>\n<p>This is <strong>bold</strong> and <em>italic</em> text.</p>\n</article>\n</body>\n</html>",
"scrapedAt": "2026-03-11T12:00:00.000Z"
}

The complete HTML file is also saved to the key-value store under the key OUTPUT with content type text/html, making it directly downloadable and viewable in a browser.

Usage Examples / Use Cases

  • Documentation publishing — convert Markdown docs, READMEs, and changelogs to styled HTML pages
  • Blog content — transform Markdown blog posts into HTML with syntax-highlighted code blocks
  • Email templates — generate HTML fragments from Markdown for use in email campaigns
  • Static site generation — batch-convert Markdown files to HTML as part of a build pipeline
  • Report formatting — produce presentable HTML reports from Markdown source files
  • Apify pipeline step — chain with other actors to convert scraped Markdown content to HTML

Ready-to-run public tasks

  • Convert GFM release notes — task lists and emphasis with the GitHub theme.
  • Render a Markdown table — a bounded semantic table using the minimal theme.
  • Sanitize user Markdown — demonstrates removal of unsafe script and event-handler content.

All three tasks use inline Markdown, enable sanitization, and cap input at 5,000 characters.

Pricing

This actor uses Pay-Per-Event (PPE) pricing with the document-converted event: $1.95 per 1,000 documents converted ($0.00195 per document) in the live Store pricing entry.

Apify platform usage follows the live Store pricing entry.

FAQ

What is the difference between the GitHub and Minimal themes?

The GitHub theme replicates the look of GitHub's Markdown rendering with a sans-serif font, 980px max width, bordered headings, and striped tables. The Minimal theme uses a serif font (Georgia), narrower 700px width, and a cleaner reading-focused layout. Choose none for unstyled HTML and provide your own CSS via the customCss field.

Does this sanitize raw HTML inside Markdown?

Yes, by default. The actor removes scripts, inline event handlers, scriptable URLs, and disallowed tags or attributes from the converted Markdown body. Set sanitize to false only when the Markdown is trusted and preserving raw HTML is intentional.

Can I get just the HTML body without the full document wrapper?

Yes. Set wrapInHtmlDocument to false and the actor will output only the HTML body content (with optional <style> block). This is useful when you need to embed the converted HTML inside an existing page or template.

What programming languages are supported for syntax highlighting?

The actor uses highlight.js, which supports over 190 programming languages. If a language is specified in the Markdown code fence (e.g., ```python), it uses that language's highlighter. If no language is specified, highlight.js automatically detects the language.

Does this actor need a proxy?

No proxy configuration is used. Markdown to HTML Converter is a document transformation tool; when markdownUrl is provided, it makes one direct HTTP request to download that file.

Can I convert multiple Markdown files in one run?

The actor processes one Markdown document per run. For batch conversion, use the Apify API to trigger multiple runs programmatically, or chain it with another actor that produces Markdown content.