/install url2md
Url2md
Convert web pages to clean, readable Markdown.
Quick Start
Single URL
python3 scripts/url2md.py https://example.com/article
Output to a file:
python3 scripts/url2md.py https://example.com/article -o article.md
Batch Conversion
Create a file with URLs (one per line):
https://example.com/article-1
https://example.com/article-2
https://example.com/article-3
Convert all and save to a directory:
python3 scripts/url2md.py -f urls.txt -d ./markdown_files/
Features
- No dependencies: Uses only Python standard library (
urllib,html.parser) - Title extraction: Automatically adds page title as H1
- Link resolution: Converts relative URLs to absolute
- Basic formatting: Headings, paragraphs, lists, links, images, code blocks, tables
- Noise removal: Strips scripts, styles, navigation, footers, and other boilerplate
Script Reference
scripts/url2md.py
Usage:
url2md.py [url] [options]
Options:
| Option | Description |
|---|---|
url |
Single URL to convert |
-o, --output |
Output file (default: stdout) |
-f, --file |
File containing URLs to convert |
-d, --dir |
Output directory for batch conversion |
--no-title |
Skip adding page title as H1 |
--timeout |
Request timeout in seconds (default: 30) |
-v, --version |
Show version |
Examples:
# Single URL to stdout
python3 scripts/url2md.py https://docs.python.org/3
# Save to file
python3 scripts/url2md.py https://docs.python.org/3 -o python-docs.md
# Batch with custom timeout
python3 scripts/url2md.py -f urls.txt -d ./output/ --timeout 60
# Skip title
python3 scripts/url2md.py https://example.com --no-title
When to Use
- Converting documentation pages to Markdown for local reference
- Archiving web articles as text files
- Building static content from dynamic sources
- Extracting readable content when browser tools are unavailable
- Batch processing a list of URLs
Limitations
- Converts static HTML only; does not execute JavaScript
- Complex layouts (multi-column, heavy CSS) may lose structural fidelity
- Login-required or paywalled content requires authentication tokens
- Rate-limited sites may block repeated requests
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install url2md - After installation, invoke the skill by name or use
/url2md - Provide required inputs per the skill's parameter spec and get structured output
What is URL to Markdown?
Convert HTML web pages from HTTP/HTTPS URLs to clean, readable Markdown files with optional batch processing and formatting features. It is an AI Agent Skill for Claude Code / OpenClaw, with 34 downloads so far.
How do I install URL to Markdown?
Run "/install url2md" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is URL to Markdown free?
Yes, URL to Markdown is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does URL to Markdown support?
URL to Markdown is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created URL to Markdown?
It is built and maintained by Rex Wang (@rwonly); the current version is v1.0.0.