HTML to Markdown avatar

HTML to Markdown

Pricing

$3.00/month + usage

Go to Apify Store
HTML to Markdown

HTML to Markdown

Convert HTML to clean Markdown. Supports GFM tables, code blocks, and custom rules. Perfect for content migration and documentation.

Pricing

$3.00/month + usage

Rating

0.0

(0)

Developer

Web Harvester

Web Harvester

Maintained by Community

Actor stats

0

Bookmarked

3

Total users

1

Monthly active users

4 months ago

Last modified

Share

🔄 Convert HTML to clean Markdown. Supports GFM tables, code blocks, and custom formatting. Perfect for content migration.

Apify Actor License: MIT

🎯 What This Actor Does

Convert HTML to Markdown:

  • GFM Tables - HTML tables → Markdown tables
  • Code Blocks - Fenced or indented
  • Headings - ATX (#) or Setext (underlined)
  • Lists - Customizable bullet markers
  • Clean Output - Readable Markdown

🚀 Use Cases

Use CaseDescription
Content MigrationMove HTML to Markdown-based CMS
DocumentationConvert HTML docs to MD
Web ScrapingExtract content as Markdown
Blog ImportImport HTML posts
ArchiveStore web content as MD
Git WikisConvert HTML wikis

📥 Input Examples

Basic Conversion

{
"html": "<h1>Title</h1><p>Content</p>",
"headingStyle": "atx"
}

From URL

{
"htmlUrl": "https://example.com/page.html",
"gfmTables": true
}

Custom Formatting

{
"html": "<ul><li>Item</li></ul>",
"bulletListMarker": "*",
"codeBlockStyle": "fenced"
}

⚙️ Configuration

ParameterTypeDefaultDescription
htmlstring-HTML content
htmlUrlstring-URL to HTML page
headingStylestringatxatx (#) or setext (underlined)
codeBlockStylestringfencedfenced (```) or indented
bulletListMarkerstring--, *, or +
gfmTablesbooleantrueConvert tables to GFM
keepImagesbooleantrueConvert img tags
keepLinksbooleantrueConvert a tags

📤 Output

{
"inputLength": 200,
"outputLength": 150,
"headingStyle": "atx",
"markdown": "# Title\n\nContent here...",
"markdownUrl": "https://api.apify.com/v2/..."
}

📝 Conversion Examples

Headers

<h1>Title</h1> → # Title
<h2>Subtitle</h2> → ## Subtitle

Text Formatting

<strong>bold</strong> → **bold**
<em>italic</em> → *italic*
<code>code</code> → `code`

Lists

<ul><li>Item</li></ul> → - Item
<ol><li>First</li></ol> → 1. First

💰 Cost Estimation

SizeApprox. TimeCompute Units
10 KB~1 second~0.001
100 KB~2 seconds~0.003

🔧 Technical Details

  • Language: TypeScript / Node.js 22
  • Library: Turndown 7.x
  • Memory: 128MB-256MB

📄 License

MIT License - see LICENSE for details.


🏪 Apify Store Listing


Keywords: html to markdown, html to md, turndown, html converter, markdown converter, content migration, gfm