Runtype

MarkItDown API RustWASM

Convert documents to Markdown. Powered by Rust + WebAssembly, based on microsoft/markitdown.

Try It

Upload File
Paste HTML/Text
↑

Drop a file here or click to browse

.html .csv .pdf .txt .md .json .ipynb .epub .rss .atom .zip — up to 10 MB

Converted markdown will appear here...

API Reference

Endpoints

GET / — This page
GET /health — Health check + list of supported formats
POST / — Convert a file to Markdown

Request: Multipart Upload

curl -X POST https://<worker-url>/ \
  -F "file=@document.html"

Request: Raw Body

curl -X POST https://<worker-url>/ \
  -H "Content-Type: text/html" \
  -H "X-Filename: page.html" \
  --data-binary @document.html

Response

{
  "markdown": "# Document Title\n\nConverted content...",
  "title": "Document Title"
}

Status Codes

200 Conversion successful
400 Missing file or empty body
413 File exceeds 10 MB limit
422 Conversion failed (unsupported or malformed file)

JavaScript / Fetch

const form = new FormData();
form.append("file", fileBlob, "doc.html");

const res = await fetch("/", { method: "POST", body: form });
const { markdown, title } = await res.json();

Python / requests

import requests

resp = requests.post(
    "https://<worker-url>/",
    files={"file": open("doc.html", "rb")}
)
data = resp.json()
print(data["markdown"])

Supported Formats

.txt .md Plain text
.html .htm HTML
.csv CSV tables
.pdf PDF documents
.rss .atom RSS/Atom feeds
.ipynb Jupyter notebooks
.epub EPUB e-books
.zip ZIP archives
.json .log Structured text
.py .rs .js Source code

File type is detected from the Content-Type header, X-Filename extension, and magic bytes. For best results, include the correct file extension.

Resources