HTML to Markdown
Convert any HTML content or URL into clean, LLM-ready Markdown. Strips noise (scripts, styles, nav, ads), preserves structure (headings, links, lists, code blocks, tables).
How It Works
- Accept raw HTML string or fetch from URL (10s timeout, follows redirects)
- Strip non-content elements:
<script>, <style>, <nav>, <footer>, <aside>
- Convert semantic HTML to Markdown: headings, bold, italic, links, images, code, lists, tables, blockquotes
- Decode HTML entities, normalize whitespace
- Return clean Markdown with metadata
Use Cases
- RAG pipeline preprocessing (web → Markdown → embeddings)
- LLM context window preparation
- Content extraction from web pages
- Documentation conversion
- Web scraping post-processing
Prerequisites
- Sign up at claw0x.com
- Create API key in Dashboard
- Set environment variable:
export CLAW0X_API_KEY="ck_live_..."
Pricing
FREE. No charge per call.
- Requires Claw0x API key for authentication
- No usage charges (price_per_call = 0)
- Unlimited calls
Example
Input:
{
"url": "https://example.com/article"
}
Output:
{
"markdown": "# Article Title\n\nFirst paragraph...\n\n## Section\n\n- Item 1\n- Item 2",
"char_count": 1234,
"line_count": 45,
"source": "https://example.com/article"
}
Error Codes
| Code |
Meaning |
| 400 |
Missing html/url, or URL fetch failed |
| 401 |
Missing or invalid API key |
| 500 |
Conversion failed (not billed) |
About Claw0x
Claw0x is the native skills layer for AI agents.
GitHub: github.com/kennyzir/html-to-markdown
1---2name: html-to-markdown3description: Convert HTML pages to clean Markdown for LLM consumption. Use when building RAG pipelines, preparing web content for AI context windows, or extracting readable content from HTML. Strips scripts, styles, nav, ads. Preserves headings, links, lists, code blocks, and tables.4---56# HTML to Markdown78Convert any HTML content or URL into clean, LLM-ready Markdown. Strips noise (scripts, styles, nav, ads), preserves structure (headings, links, lists, code blocks, tables).910## How It Works11121. Accept raw HTML string or fetch from URL (10s timeout, follows redirects)132. Strip non-content elements: `<script>`, `<style>`, `<nav>`, `<footer>`, `<aside>`143. Convert semantic HTML to Markdown: headings, bold, italic, links, images, code, lists, tables, blockquotes154. Decode HTML entities, normalize whitespace165. Return clean Markdown with metadata1718## Use Cases1920- RAG pipeline preprocessing (web → Markdown → embeddings)21- LLM context window preparation22- Content extraction from web pages23- Documentation conversion24- Web scraping post-processing2526## Prerequisites27281. **Sign up at [claw0x.com](https://claw0x.com)**292. **Create API key** in Dashboard303. **Set environment variable**: `export CLAW0X_API_KEY="ck_live_..."`3132## Pricing3334**FREE.** No charge per call.3536- Requires Claw0x API key for authentication37- No usage charges (price_per_call = 0)38- Unlimited calls3940## Example4142**Input**:43```json44{45 "url": "https://example.com/article"46}47```4849**Output**:50```json51{52 "markdown": "# Article Title\n\nFirst paragraph...\n\n## Section\n\n- Item 1\n- Item 2",53 "char_count": 1234,54 "line_count": 45,55 "source": "https://example.com/article"56}57```5859## Error Codes6061| Code | Meaning |62|------|---------|63| 400 | Missing html/url, or URL fetch failed |64| 401 | Missing or invalid API key |65| 500 | Conversion failed (not billed) |6667## About Claw0x6869[Claw0x](https://claw0x.com) is the native skills layer for AI agents.7071**GitHub**: [github.com/kennyzir/html-to-markdown](https://github.com/kennyzir/html-to-markdown)