Markdown to HTML Converter
Pricing
from $1.30 / 1,000 document converteds
Markdown to HTML Converter
Convert Markdown to styled HTML with GFM support, syntax highlighting, tables, task lists. Choose GitHub, Dark, or Minimal theme. Code blocks with language highlighting. Full document or fragment output.
Pricing
from $1.30 / 1,000 document converteds
Rating
0.0
(0)
Developer
junipr
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
17 hours ago
Last modified
Categories
Share
What does Markdown to HTML Converter 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
- Zero-config — runs with a sample Markdown document if no input is provided
- 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,"customCss": ""}
| Parameter | Type | Default | Description |
|---|---|---|---|
markdown | string | "" | Raw Markdown text to convert. Takes priority over markdownUrl. |
markdownUrl | string | "" | URL to a Markdown file to fetch and convert |
maxMarkdownCharacters | integer | 100000 | Maximum markdown characters per run, capped at 250,000 |
theme | string | "github" | CSS theme: github, minimal, or none |
includeStyles | boolean | true | Include CSS styles in the output |
syntaxHighlight | boolean | true | Enable code block syntax highlighting |
wrapInHtmlDocument | boolean | true | Wrap output in a complete HTML document. Set to false for HTML fragment. |
gfm | boolean | true | Enable GitHub Flavored Markdown (tables, task lists, strikethrough) |
customCss | string | "" | 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,"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
Pricing
This actor uses Pay-Per-Event (PPE) pricing: $1.30 per 1,000 documents converted ($0.0013 per event).
Pricing includes all platform compute costs — no hidden fees.
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?
No. This actor converts Markdown to HTML and preserves raw inline HTML supported by the Markdown parser. If you render output from untrusted users in a browser, sanitize the HTML in your application before embedding it.
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. Markdown to HTML Converter is a document transformation tool. When fetching from a URL, it makes a single HTTP request to download the Markdown file. No proxy is needed and it works on any Apify plan including the free tier.
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.
Related Actors
- JSON to CSV Converter — convert JSON data to CSV or TSV format
- PDF to HTML Converter — convert PDF documents to structured HTML
- RAG Web Extractor — extract clean Markdown content from web pages for AI pipelines
- Image to PDF Converter — convert images to PDF documents
- PDF to Text Extractor — extract plain text from PDF files