File to Markdown Converter
/install file-to-markdown
File to Markdown — Skill\r
\r
Overview\r
\r
Convert files into clean, structured, AI-ready Markdown using the markdown.new API powered by Cloudflare Workers AI toMarkdown().\r
\r
Supports 20+ formats including documents, spreadsheets, images, and structured data.\r
\r
No authentication required (500 requests/day per IP).\r
\r
---\r
\r
When to Use This Skill\r
\r Use this skill whenever you need to:\r \r
- Extract text from files for LLM processing\r
- Convert PDFs or Office files into Markdown\r
- Normalize data into structured text\r
- Process uploaded user files\r
- Scrape webpage content into Markdown\r
- Convert images into AI-generated descriptions + content\r \r Common AI workflows:\r \r
- RAG ingestion pipelines\r
- Knowledge base creation\r
- Document summarization\r
- Dataset extraction\r
- Spreadsheet analysis\r
- OCR-like extraction from images\r \r ---\r \r
Supported Formats\r
\r
Documents\r
\r
.pdf\r.docx\r.odt\r \r
Spreadsheets\r
\r
.xlsx\r.xls\r.xlsm\r.xlsb\r.et\r.ods\r.numbers\r \r
Images\r
\r
.jpg\r.jpeg\r.png\r.webp\r.svg\r \r
Text & Structured Data\r
\r
.txt\r.md\r.csv\r.json\r.xml\r.html\r.htm\r \r Notes:\r \r- Image conversion uses AI object detection + summarization.\r
- HTML URL conversion uses a web page pipeline.\r
- Uploaded HTML uses Workers AI conversion.\r \r ---\r \r
API Base URL\r
\r
https://markdown.new\r
```\r
\r
---\r
\r
## Endpoints\r
\r
### 1️⃣ Convert Remote File (Simple GET)\r
\r
Returns plain Markdown text.\r
\r
```\r
GET /:file-url\r
```\r
\r
Example:\r
\r
```bash\r
curl -s "https://markdown.new/https://example.com/report.pdf"\r
```\r
\r
---\r
\r
### 2️⃣ Convert Remote File (JSON Response)\r
\r
Returns metadata + Markdown.\r
\r
```\r
GET /:file-url?format=json\r
```\r
\r
Example:\r
\r
```bash\r
curl -s "https://markdown.new/https://example.com/report.pdf?format=json"\r
```\r
\r
---\r
\r
### 3️⃣ Convert Remote File via POST\r
\r
Use when you want structured JSON response.\r
\r
```\r
POST /\r
Content-Type: application/json\r
```\r
\r
Body:\r
\r
```json\r
{\r
"url": "https://example.com/report.pdf"\r
}\r
```\r
\r
Example:\r
\r
```bash\r
curl -s https://markdown.new/ \\r
-H "Content-Type: application/json" \\r
-d '{"url": "https://example.com/report.pdf"}'\r
```\r
\r
---\r
\r
### 4️⃣ Upload Local File\r
\r
Use when file is not publicly accessible.\r
\r
```\r
POST /convert\r
multipart/form-data\r
```\r
\r
Example:\r
\r
```bash\r
curl -s https://markdown.new/convert \\r
-F "[email protected]"\r
```\r
\r
---\r
\r
## Response Formats\r
\r
### URL Conversion Response\r
\r
```json\r
{\r
"success": true,\r
"url": "https://example.com/report.pdf",\r
"title": "Quarterly Report",\r
"content": "# Quarterly Report\
\
...",\r
"method": "Workers AI (file)",\r
"duration_ms": 1200,\r
"tokens": 850\r
}\r
```\r
\r
---\r
\r
### Upload Conversion Response\r
\r
```json\r
{\r
"success": true,\r
"data": {\r
"title": "Q4 Report",\r
"content": "# Q4 Report\
\
...",\r
"filename": "report.xlsx",\r
"file_type": ".xlsx",\r
"tokens": 1250,\r
"processing_time_ms": 320\r
}\r
}\r
```\r
\r
---\r
\r
## Best Practices for AI Agents\r
\r
### Prefer GET for Simple Workflows\r
\r
Use:\r
\r
```\r
GET /:url\r
```\r
\r
When:\r
\r
* You only need Markdown text\r
* Speed is important\r
* No metadata required\r
\r
---\r
\r
### Prefer POST for Structured Pipelines\r
\r
Use POST when:\r
\r
* Metadata is needed\r
* Token counts are required\r
* Monitoring or logging is implemented\r
* Building automation workflows\r
\r
---\r
\r
### File Upload Strategy\r
\r
Use `/convert` only if:\r
\r
* File is local\r
* File is private\r
* File requires authentication to access\r
\r
Otherwise always prefer URL conversion.\r
\r
---\r
\r
## Error Handling Strategy\r
\r
Agents should:\r
\r
1. Check `"success": true`\r
2. Retry once if network failure\r
3. Validate content length > 0\r
4. Fallback to alternate extraction if needed\r
\r
---\r
\r
## Rate Limits\r
\r
* 500 requests/day per IP without API key\r
* No signup required\r
\r
Agents should:\r
\r
* Cache results when possible\r
* Avoid duplicate conversions\r
\r
---\r
\r
## Integration Examples\r
\r
### JavaScript (Node.js)\r
\r
```js\r
const res = await fetch("https://markdown.new/", {\r
method: "POST",\r
headers: { "Content-Type": "application/json" },\r
body: JSON.stringify({\r
url: "https://example.com/file.pdf"\r
})\r
});\r
\r
const data = await res.json();\r
console.log(data.content);\r
```\r
\r
---\r
\r
### Python\r
\r
```python\r
import requests\r
\r
res = requests.post(\r
"https://markdown.new/",\r
json={"url": "https://example.com/file.pdf"}\r
)\r
\r
data = res.json()\r
print(data["content"])\r
```\r
\r
---\r
\r
## Agent Decision Tree\r
\r
If user provides:\r
\r
| Input Type | Action |\r
| --------------- | ---------------------- |\r
| Public file URL | Use GET or POST |\r
| Local file | Use POST /convert |\r
| Image | Convert then summarize |\r
| Spreadsheet | Convert then analyze |\r
| Webpage | Convert URL HTML |\r
\r
---\r
\r
## Output Expectations\r
\r
The Markdown should be:\r
\r
* Clean\r
* Structured\r
* AI-friendly\r
* Minimal noise\r
* Ready for LLM ingestion\r
\r
---\r
\r
## Limitations\r
\r
* Complex PDF layouts may lose formatting\r
* Large spreadsheets may be truncated\r
* Images rely on AI interpretation accuracy\r
* Token limits may apply\r
\r
---\r
\r
## Summary\r
\r
This skill provides a **universal file-to-Markdown conversion layer** for AI systems with:\r
\r
* No authentication\r
* Simple HTTP interface\r
* Multi-format support\r
* Structured output\r
* Fast processing\r
\r
Ideal for document ingestion, RAG pipelines, and automation agents.\r
\r
---\r
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install file-to-markdown - After installation, invoke the skill by name or use
/file-to-markdown - Provide required inputs per the skill's parameter spec and get structured output
What is File to Markdown Converter?
Convert documents, spreadsheets, images, and structured files into clean, structured Markdown optimized for AI processing without authentication. It is an AI Agent Skill for Claude Code / OpenClaw, with 674 downloads so far.
How do I install File to Markdown Converter?
Run "/install file-to-markdown" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is File to Markdown Converter free?
Yes, File to Markdown Converter is completely free (open-source). You can download, install and use it at no cost.
Which platforms does File to Markdown Converter support?
File to Markdown Converter is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created File to Markdown Converter?
It is built and maintained by alaminrifat (@alaminrifat); the current version is v1.0.0.