PDF to Word
Convert PDF documents to editable Microsoft Word (.docx) format.
https://api.morphopdf.com/v1/convert/pdf-to-wordAuthentication
Retrieve your API Key from Dashboard.
Request Body
Provide the PDF file using one of the following methods.
fileFilePDF file uploaded via multipart/form-data.
urlstringOptionalPublic URL pointing to a PDF file. Alternative to file upload.
Query Parameters
formatstringOptionalDefault: jsonResponse format. Use 'binary' to receive the Word document directly, or 'json' (default) to receive metadata with a download URL.
URL Requirements
URLs must be publicly accessible, use http:// or https://, max 50MB per file, 30s timeout. Private IPs (localhost, 192.168.x.x, 10.x.x.x) are blocked for security.
Response
When using format=json (default):
successbooleanIndicates whether the operation completed successfully.
messagestringHuman-readable status message.
fileNamestringName of the generated Word document.
downloadUrlstringPresigned URL to download the file. Valid for 1 hour.
pageCountnumberNumber of pages in the original PDF.
methodstringConversion method used ('cli' for high-quality, 'fallback' for basic).
Binary Response
Add ?format=binary to receive the Word document directly with these headers:
Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.documentContent-Disposition: attachment; filename="document.docx"
Error Responses
| Status | Code | Description |
|---|---|---|
| 400 | INVALID_INPUT | No file provided or invalid file format |
| 400 | PASSWORD_PROTECTED | PDF is password-protected. Unlock it first. |
| 401 | AUTHENTICATION_REQUIRED | Missing or invalid API key |
| 413 | FILE_TOO_LARGE | File exceeds maximum size limit |
| 500 | PROCESSING_FAILED | Internal processing error |
/v1/convert/pdf-to-wordcurl -X POST "https://api.morphopdf.com/v1/convert/pdf-to-word?format=binary" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@document.pdf" \
--output document.docx{
"success": true,
"message": "File processed successfully",
"fileName": "document.docx",
"downloadUrl": "https://files.morphopdf.com/sessions/abc123/output/document.docx?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=3600&...",
"pageCount": 10,
"method": "cli"
}