---
title: "Word to PDF API: Convert DOC, DOCX, ODT, and RTF"
slug: convert-word-to-pdf
url: https://apyhub.com/apyhub/service/convert-word-to-pdf
provider: ApyHub
categories: [Output Kit]
tags: [convert, pdf, word]
auth: api_key
version: 1.0.0
service_type: sync
endpoints: 6
atoms: 100
mcp: true
alias: converter-doc-pdf
---

# Word to PDF API: Convert DOC, DOCX, ODT, and RTF

Word to PDF API: send a DOC, DOCX, ODT, or RTF file, a URL, or a base64 string and get a PDF download or signed link. Free tier, no card.

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| POST | `https://api.eu.apyhub.com/apyhub/convert-word-to-pdf/base64/link` | What it does Converts a base64-encoded Word document into a PDF and returns a signed link to the ge… | 100 |
| POST | `https://api.eu.apyhub.com/apyhub/convert-word-to-pdf/file/download` | What it does Converts an uploaded Word document to a PDF and returns the generated PDF as a binary… | 100 |
| POST | `https://api.eu.apyhub.com/apyhub/convert-word-to-pdf/file/link` | What it does Converts an uploaded Word document to a PDF and returns a signed link to the generated… | 100 |
| POST | `https://api.eu.apyhub.com/apyhub/convert-word-to-pdf/url/download` | What it does Converts a remote Word document at the provided URL into a PDF and returns the PDF as… | 100 |
| POST | `https://api.eu.apyhub.com/apyhub/convert-word-to-pdf/url/link` | What it does Converts a remote Word document available at a URL into a PDF and returns a signed PDF… | 100 |
| POST | `https://api.eu.apyhub.com/apyhub/convert-word-to-pdf/base64/download` | What it does Converts a base64-encoded Word document to a PDF and returns the PDF as a binary downl… | 100 |

## Endpoint reference

### submit base64: download file

`POST https://api.eu.apyhub.com/apyhub/convert-word-to-pdf/base64/link` · 100 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `base64` | body | string | yes | Base64-encoded file bytes. |

#### Quickstart

Upload a Base64-encoded file and get back a PDF download link.

```bash
curl -X POST "https://api.eu.apyhub.com/apyhub/convert-word-to-pdf/base64/link" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "base64": "JVBERi0xLjQKJcfs...example-base64-content..."
  }'
```

Replace the example `base64` value with the Base64-encoded content of your file.

#### What you'll get back

Returns a JSON object with a `data` string field containing the download URL for the generated PDF.

```json
{
  "data": "https://example.com/output.pdf"
}
```

### Upload file: download file

`POST https://api.eu.apyhub.com/apyhub/convert-word-to-pdf/file/download` · 100 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `file` | body | string (binary) | yes | .doc, .docx, .odt, or .rtf |
| `output` | query | string | no | Example: `output.pdf`. |
| `landscape` | query | boolean | no | Default: `false`. |

#### Quickstart

Upload a Word document to convert it to PDF.

```bash
curl -X POST "https://api.eu.apyhub.com/apyhub/convert-word-to-pdf/file/download?output=output.pdf" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/document.docx"
```

#### What you'll get back

Returns a binary file  - the converted PDF document.

### upload file: generated url

`POST https://api.eu.apyhub.com/apyhub/convert-word-to-pdf/file/link` · 100 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `file` | body | string (binary) | yes |  |
| `landscape` | query | boolean | no | Default: `false`. |

#### Quickstart

Upload a Word file to convert it into a PDF.

```bash
curl -X POST "https://api.eu.apyhub.com/apyhub/convert-word-to-pdf/file/link?landscape=false" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/document.docx"
```

#### What you'll get back

Returns a JSON object with a `data` string field containing the generated PDF URL.

```json
{
  "data": "https://example.com/file.pdf"
}
```

### submit url : download file

`POST https://api.eu.apyhub.com/apyhub/convert-word-to-pdf/url/download` · 100 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `url` | body | string (uri) | yes | Example: `https://assets.apyhub.com/samples/sample.docx`. |
| `landscape` | query | boolean | no | Default: `false`. |

#### Quickstart

Convert a Word document from a public URL into a PDF. The `url` goes in the JSON body, and the optional `landscape` flag is sent as a query parameter if needed.

```bash
curl -X POST "https://api.eu.apyhub.com/apyhub/convert-word-to-pdf/url/download" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://assets.apyhub.com/samples/sample.docx"
  }' \
  -o converted.pdf
```

#### What you'll get back

Returns the converted PDF as a binary file response.

The example above saves the downloaded file locally as `converted.pdf`.

### submit url: generated url

`POST https://api.eu.apyhub.com/apyhub/convert-word-to-pdf/url/link` · 100 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `url` | body | string (uri) | yes | Example: `https://assets.apyhub.com/samples/sample.docx`. |

#### Quickstart

Convert a Word document from a URL into a PDF by sending the document link in the request body.

```bash
curl -X POST "https://api.eu.apyhub.com/apyhub/convert-word-to-pdf/url/link" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://assets.apyhub.com/samples/sample.docx"
  }'
```

#### What you'll get back

Returns a JSON object with a `data` string field containing the generated PDF file URL.

```json
{
  "data": "https://assets.apyhub.com/files/output.pdf"
}
```

### submit base64: download file

`POST https://api.eu.apyhub.com/apyhub/convert-word-to-pdf/base64/download` · 100 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `base64` | body | string | yes | Base64-encoded file bytes. |
| `landscape` | query | boolean | no | Default: `false`. |

#### Quickstart

Convert a Base64-encoded Word file into a downloadable PDF.

```bash
curl -X POST "https://api.eu.apyhub.com/apyhub/convert-word-to-pdf/base64/download" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "base64": "JVBERi0xLjQKJ...example-base64-content..."
  }' \
  -o converted.pdf
```

Replace the example `base64` value with the Base64-encoded content of your Word document.

#### What you'll get back

Returns the generated PDF as a binary file response.

The example above saves the downloaded file locally as `converted.pdf`.

## About

## What it does
The **Word to PDF API** converts DOC, DOCX, ODT, and RTF documents into PDFs. Send the document as a multipart `file` upload, a remote `url`, or a `base64` string, and get the PDF back as a binary download or as a signed link in the `data` field of a JSON response.

The Word to PDF API has six endpoints, one for each input and output pair. Set `landscape` to `true` for landscape pages on the upload endpoints, the URL download endpoint, and the base64 download endpoint (it defaults to `false`). On the upload download endpoint, `output` sets the PDF filename. Uploads are capped at 100 MB per request.

Teams use this DOCX to PDF API to lock generated contracts, invoices, and reports into a fixed layout before sending them, to archive editable drafts, or to add a PDF export button to a document editor. The base64 endpoints fit serverless functions that already hold the file in memory, and the URL endpoints fit files kept in object storage. Each call returns the converted PDF in the same response.

To go the other way, the [Convert PDF to Word API](https://apyhub.com/apyhub/service/convert-pdf-to-docx) turns a PDF back into an editable DOCX.

Pairs well with: stamp drafts and confidential copies with the [PDF Watermark API](https://apyhub.com/apyhub/service/apply-watermark-on-pdf), or combine several converted files into one document with the [Merge Files to PDF API](https://apyhub.com/apyhub/service/merge-files-to-pdf).

## Usage

Base URL: `https://api.eu.apyhub.com` (default region — see
`GET https://apyhub.com/api/public/regions` for the rest).

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/apyhub/service/convert-word-to-pdf
