PDF Conversion API

Integrate document conversion into your applications with a simple REST API.

Base URLhttps://api.office2pdf.app
POSTapi/pdf/preview

Upload a document file and receive a PDF in response.

Request

Headers
x-api-key: YOUR_API_KEY
Body (multipart/form-data)
FieldTypeRequiredDescription
fileFileYesDocument 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-Type manually 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 OK
Content-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.