Document Convert
Convert between document formats (PDF, DOCX, EPUB, HTML, DOC, RTF, ODT, TXT).
/v1/convert/document
curl -OJ "https://convert.toolkitapi.io/v1/convert/document?url=https://toolkitapi.io/report.docx&from_format=docx&to_format=pdf"
import httpx
resp = httpx.get(
"https://convert.toolkitapi.io/v1/convert/document?url=https://toolkitapi.io/report.docx&from_format=docx&to_format=pdf",
)
print(resp.json())
const resp = await fetch("https://convert.toolkitapi.io/v1/convert/document?url=https://toolkitapi.io/report.docx&from_format=docx&to_format=pdf", {
});
const data = await resp.json();
console.log(data);
# See curl example
Binary document file streamed as a download (Content-Type depends on to_format)
Try It Live
Description
How to Use
1. Host the source document at a public URL (or POST base64 `file` or raw `html`).
2. Call with `from_format`, `to_format`, and any format-specific options (`pages`, `dpi`, `page_size`, metadata).
3. Save the streamed file, or read `result` from the JSON response on POST.
About This Tool
The unified document endpoint moves between `pdf`, `docx`, `epub`, `html`, `doc`, `rtf`, `odt`, and `txt`, and can also render PDFs as page images (`png`, `jpeg`).
Internally, the service selects the most faithful converter for each format pair — `pandoc` for markup-heavy conversions, `libreoffice` for Office formats, and `pdf2image`/`reportlab` for PDF rendering.
Why Use This Tool
- Cross-platform sharing — Convert DOCX to PDF for recipients without Word
- Archive normalization — Bring mixed document archives to a single format
- HTML → PDF reports — Generate print-ready PDFs from web pages
- PDF → images — Render PDF pages for thumbnails or previews
Frequently Asked Questions
What's the highest-fidelity conversion?
Can I watermark the output?
Are embedded fonts preserved?
Start using Document Convert now
Get your free API key and make your first request in under a minute.