PDF Conversion API
Integrate document conversion into your applications with a simple REST API.
Base URL
https://api.office2pdf.appPOST
api/pdf/previewUpload a document file and receive a PDF in response.
Request
Headers
x-api-key: YOUR_API_KEY
Body (multipart/form-data)
| Field | Type | Required | Description |
|---|---|---|---|
| file | File | Yes | Document to convert (.doc, .docx, .ppt, .pptx, .xls, .xlsx, .csv) |
File size limits:
- Free: up to 50MB
- Plus: up to 150MB
- Max: up to 512MB
Notes
- Do not set
Content-Typemanually when using multipart/form-data. - The client automatically sets the correct boundary.
- Each request counts toward your monthly quota.
Example
curl -X POST "https://api.office2pdf.app/api/pdf/preview" \ -H "x-api-key: YOUR_API_KEY" \ -F "file=@document.docx" \ --output converted.pdf
Tip: All examples use the same API endpoint and authentication method. Choose the language that fits your stack.
Response
Success
200 OKContent-Type: application/pdf Body: PDF binary data
Error
4xx / 5xx{
"error": "CONVERT_FAILED",
"message": "Error description"
}Need higher limits or enterprise support? Contact us via email in the footer.