DOCX to PDF API — Free Tier + Pay-As-You-Go
Convert Word DOCX to PDF programmatically. LibreOffice-rendered with font fallback, headers/footers, and PDF/A archival output.
What it does
The DOCX to PDF API renders Word documents to PDF using LibreOffice with high fidelity for typical office documents (~99% match to Word's own PDF output). The pipeline ships with a 200-font fallback bundle covering Latin, Cyrillic, Greek, Arabic, Hebrew, Chinese, Japanese, and Korean — so documents authored in proprietary fonts (Calibri, Cambria, Segoe UI) render correctly without those fonts present on our servers via substitution rules tuned for metric matching. Per-job parameters control page size (A4, US Letter, A3, custom dimensions), margins, headers and footers (text or HTML overlay), watermarks (text or image), password protection (40-bit RC4 or 128-bit AES), and PDF/A archival output (PDF/A-1b, PDF/A-2b, PDF/A-3b).
The PDF/A path is essential for legal and government workflows requiring long-term archival; outputs validate against verapdf with zero violations. Macros, embedded ActiveX, and VBA scripts are stripped during conversion for security — DOCX files weaponised with malicious macros render their content but lose their executable payload.
Supported formats
Source formats (4)
- docx
- doc
- odt
- rtf
Target formats (1)
Quick start
Every sample posts the job, then polls /v1/status/{jobId} until it finishes, with your API key in the X-Api-Key header. The parameter names below are the ones the endpoint actually accepts — anything else is dropped rather than rejected.
curl -X POST https://api.convertintomp4.com/v1/convert \
-H "X-Api-Key: ck_your_api_key" \
-F "file=@input.docx" \
-F "targetFormat=pdf"
-F "pageSize=A4" \
-F "engine=libreoffice"import { readFileSync } from "node:fs";
import { ConvertIntoMP4Client } from "convertintomp4";
const apiKey = process.env.CIM4_API_KEY;
const client = new ConvertIntoMP4Client({ apiKey });
// Presigned direct-to-R2 upload, then queue the conversion.
const { jobId } = await client.uploadDirect(
readFileSync("input.docx"),
"input.docx",
"application/octet-stream",
{ targetFormat: "pdf" },
);
// Poll until the job reaches a terminal state.
let job;
do {
await new Promise((r) => setTimeout(r, 2000));
job = await fetch(`https://api.convertintomp4.com/v1/status/${jobId}`, {
headers: { "X-Api-Key": apiKey },
}).then((r) => r.json());
} while (job.status !== "completed" && job.status !== "failed");
console.log("Download URL:", job.result?.downloadUrl);import time, requests
from convertintomp4 import Client
api_key = "ck_your_api_key"
client = Client(api_key=api_key)
# Presigned direct-to-R2 upload, then queue the conversion.
with open("input.docx", "rb") as f:
job = client.upload_direct(
f, "input.docx", "application/octet-stream", "pdf"
)
# Poll until the job reaches a terminal state.
while True:
status = requests.get(
f"https://api.convertintomp4.com/v1/status/{job['jobId']}",
headers={"X-Api-Key": api_key},
).json()
if status["status"] in ("completed", "failed"):
break
time.sleep(2)
print("Download URL:", status.get("result", {}).get("downloadUrl"))Features
- LibreOffice rendering — ~99% match to Word
- 200-font fallback bundle (Latin, CJK, RTL)
- Custom page size, margins, headers, footers
- Watermarks (text + image)
- PDF/A-1b, -2b, -3b archival output
- Password protection (40-bit RC4 + 128-bit AES)
- Macro stripping for security
Pricing
From $9.99/mo (Pro) or $24.99/mo (Business) — or pay-as-you-go on the API plan.
Free tier: 5 conversions/day, 100 MB file size, no API key required (IP-gated). Pro $9.99/mo: 100/day (2,000/month), 2 GB files. Business $24.99/mo: 1,000/day (20,000/month), 10 GB files, GPU encoding, dedicated support.
See full pricing breakdown →Built for production
99.9% uptime SLA
Multi-region failover, transparent status page, 60-second response-time guarantee on Business.
Encryption + auto-delete
TLS 1.2+ in transit, AES-256 at rest. Files deleted after 1h / 24h / 7d depending on plan, or instantly via DELETE endpoint. See the security page.
~7s median latency
Most sub-100 MB jobs complete in 6-9 seconds. Webhook-driven async for heavier workloads; waitForJob for synchronous flows.
Frequently Asked Questions
How does this compare to Word's own PDF export?
LibreOffice renders DOCX with ~99% fidelity for native Word documents. Complex elements (SmartArt, ActiveX controls, VBA-rendered visuals, Excel-embedded charts) may render slightly differently. For pixel-identical Word output, pass `pdfEngine=word365` on the Business plan to render via headless Microsoft 365.
What's PDF/A and when should I use it?
PDF/A is the ISO-standardised archival flavour of PDF — all fonts embedded, no JavaScript or external dependencies, metadata for long-term preservation. Legal contracts, government submissions and archive deposits usually require PDF/A-1b or -2b. It is a second call, not a parameter on this one: convert DOCX to PDF first, then send that PDF back with `toolOperation=to-pdfa` and `pdfaVersion=1b|2b|3b`.
Are fonts embedded in the output?
Yes by default — embedded as full or subset depending on usage frequency. Pass `embedAllFonts=true` to force full embedding (larger file but guaranteed cross-platform identical rendering).
Can I add a watermark during conversion?
Not in the same request — the DOCX-to-PDF conversion has no watermark parameters. Convert first, then send the resulting PDF back with `toolOperation=add-watermark-pdf` and `watermarkText`, `watermarkPosition`, `watermarkOpacity`, `watermarkFontSize` and `watermarkColor`. An image watermark rides along as an `additionalFile` part on that second call.
What happens to macros in the DOCX?
Macros are stripped during conversion — both for security (preventing macro-based exploits in downstream PDF readers, although PDFs don't execute Word macros) and for PDF/A compliance (which forbids active content).
Related APIs
- MP4 to MP3 APIExtract MP3 audio from MP4 video programmatically. Per-job bitrate and sample rate, ID3 tag injection, fast remux mode.
- PDF to JPG APIRender PDF pages to JPG images programmatically. Per-page DPI, page-range selection, batch ZIP output, ImageMagick + pdftoppm pipeline.
- JPG to PNG APIConvert JPG to PNG with optional transparency, lossless compression, and EXIF preservation via API. Sharp-backed.
- MP4 to GIF APIConvert MP4 video to animated GIF programmatically. Per-job width, fps, palette mode, and start/end trim controls.
- PDF to DOCX APIConvert PDF to editable Word DOCX via API. pdf2docx layout reconstruction, automatic OCR pre-pass on scans, LibreOffice fallback.
- HEIC to JPG APIConvert iPhone HEIC and HEIF photos to JPG via API. EXIF rotation, ICC profile, Live Photo frame selection.
Or browse the full catalogue of 23 API products →
Get an API key
Start integrating the DOCX to PDF API in five minutes. Read the docs, grab a key, and ship your first conversion before the trial coffee cools.