PDF Tools API
Endpoints for merging, splitting, compressing, converting, protecting, and manipulating PDF files. All endpoints accept multipart/form-data and return the processed file as a binary download.
PDF Merge
/api/pdf-mergeMerge multiple PDF files into a single PDF document. Files are merged in the order they are uploaded.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
files | File[] | Required | Multiple PDF files to merge |
Merged PDF filecurl -X POST https://freefiletools.io/api/pdf-merge \
-H "x-api-key: fft_your_api_key" \
-F "[email protected]" \
-F "[email protected]" \
-F "[email protected]" \
-o merged.pdfPDF Split
/api/pdf-splitSplit a PDF file into multiple parts based on page ranges. Returns a ZIP file containing the split PDFs.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | PDF file to split |
ranges | string | Required | Page ranges, e.g. "1-3,5,7-9". Each range becomes a separate PDF. |
ZIP file containing split PDFscurl -X POST https://freefiletools.io/api/pdf-split \
-H "x-api-key: fft_your_api_key" \
-F "[email protected]" \
-F "ranges=1-3,5,7-9" \
-o split-pages.zipPDF Compress
/api/pdf-compressCompress a PDF file to reduce its size. Uses Ghostscript for high-quality compression.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | PDF file to compress |
level | string | Optional | Compression level: "low", "medium", or "high". Default: "medium" |
Compressed PDF filecurl -X POST https://freefiletools.io/api/pdf-compress \
-H "x-api-key: fft_your_api_key" \
-F "[email protected]" \
-F "level=high" \
-o compressed.pdfPDF to Word
/api/pdf-to-wordConvert a PDF file to a Microsoft Word (.docx) document.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | PDF file to convert |
DOCX filecurl -X POST https://freefiletools.io/api/pdf-to-word \
-H "x-api-key: fft_your_api_key" \
-F "[email protected]" \
-o document.docxPDF to Image
/api/pdf-to-imageConvert PDF pages to images. Returns a ZIP file containing one image per page.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | PDF file to convert |
format | string | Optional | Image format: "png", "jpg", or "webp". Default: "png" |
dpi | number | Optional | Resolution in DPI. Default: 150 |
ZIP file containing imagescurl -X POST https://freefiletools.io/api/pdf-to-image \
-H "x-api-key: fft_your_api_key" \
-F "[email protected]" \
-F "format=png" \
-F "dpi=300" \
-o pages.zipPDF to Excel
/api/pdf-to-excelConvert a PDF file to a Microsoft Excel (.xlsx) spreadsheet. Works best with PDFs containing tabular data.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | PDF file to convert |
XLSX filecurl -X POST https://freefiletools.io/api/pdf-to-excel \
-H "x-api-key: fft_your_api_key" \
-F "[email protected]" \
-o document.xlsxPDF to PowerPoint
/api/pdf-to-pptConvert a PDF file to a Microsoft PowerPoint (.pptx) presentation.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | PDF file to convert |
PPTX filecurl -X POST https://freefiletools.io/api/pdf-to-ppt \
-H "x-api-key: fft_your_api_key" \
-F "[email protected]" \
-o presentation.pptxWord to PDF
/api/word-to-pdfConvert a Microsoft Word (.docx) document to PDF.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | .docx file to convert |
PDF filecurl -X POST https://freefiletools.io/api/word-to-pdf \
-H "x-api-key: fft_your_api_key" \
-F "[email protected]" \
-o document.pdfPowerPoint to PDF
/api/ppt-to-pdfConvert a Microsoft PowerPoint (.pptx) presentation to PDF.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | .pptx file to convert |
PDF filecurl -X POST https://freefiletools.io/api/ppt-to-pdf \
-H "x-api-key: fft_your_api_key" \
-F "[email protected]" \
-o presentation.pdfExcel to PDF
/api/excel-to-pdfConvert a Microsoft Excel (.xlsx) spreadsheet to PDF.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | .xlsx file to convert |
PDF filecurl -X POST https://freefiletools.io/api/excel-to-pdf \
-H "x-api-key: fft_your_api_key" \
-F "[email protected]" \
-o spreadsheet.pdfProtect PDF
/api/protect-pdfPassword-protect a PDF file. The resulting PDF will require a password to open.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | PDF file to protect |
password | string | Required | Password to set on the PDF |
Password-protected PDF filecurl -X POST https://freefiletools.io/api/protect-pdf \
-H "x-api-key: fft_your_api_key" \
-F "[email protected]" \
-F "password=mysecretpassword" \
-o protected.pdfUnlock PDF
/api/unlock-pdfRemove password protection from a PDF file. Requires the current password.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | Password-protected PDF file |
password | string | Required | Current password of the PDF |
Unlocked PDF filecurl -X POST https://freefiletools.io/api/unlock-pdf \
-H "x-api-key: fft_your_api_key" \
-F "[email protected]" \
-F "password=mysecretpassword" \
-o unlocked.pdfRotate PDF
/api/rotate-pdfRotate all pages of a PDF file by a specified angle.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | PDF file to rotate |
angle | number | Required | Rotation angle: 90, 180, or 270 degrees |
Rotated PDF filecurl -X POST https://freefiletools.io/api/rotate-pdf \
-H "x-api-key: fft_your_api_key" \
-F "[email protected]" \
-F "angle=90" \
-o rotated.pdfWatermark PDF
/api/watermark-pdfAdd a text watermark to all pages of a PDF file.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | PDF file to watermark |
text | string | Required | Watermark text to add |
Watermarked PDF filecurl -X POST https://freefiletools.io/api/watermark-pdf \
-H "x-api-key: fft_your_api_key" \
-F "[email protected]" \
-F "text=CONFIDENTIAL" \
-o watermarked.pdfOCR PDF
/api/ocr-pdfApply Optical Character Recognition (OCR) to a scanned PDF, making the text selectable and searchable. Uses Tesseract OCR engine.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | Scanned PDF file |
language | string | Optional | OCR language: "eng" (English), "tur" (Turkish), "deu" (German), etc. Default: "eng" |
Searchable PDF filecurl -X POST https://freefiletools.io/api/ocr-pdf \
-H "x-api-key: fft_your_api_key" \
-F "[email protected]" \
-F "language=eng" \
-o searchable.pdfRepair PDF
/api/repair-pdfAttempt to repair a corrupted or damaged PDF file.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | Corrupted PDF file |
Repaired PDF filecurl -X POST https://freefiletools.io/api/repair-pdf \
-H "x-api-key: fft_your_api_key" \
-F "[email protected]" \
-o repaired.pdfCrop PDF
/api/crop-pdfCrop all pages of a PDF file, removing whitespace or trimming to a specific area.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | PDF file to crop |
Cropped PDF filecurl -X POST https://freefiletools.io/api/crop-pdf \
-H "x-api-key: fft_your_api_key" \
-F "[email protected]" \
-o cropped.pdfAdd Page Numbers
/api/page-numbersAdd page numbers to all pages of a PDF file.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | PDF file |
PDF file with page numberscurl -X POST https://freefiletools.io/api/page-numbers \
-H "x-api-key: fft_your_api_key" \
-F "[email protected]" \
-o numbered.pdfImage to PDF
/api/img-to-pdfConvert one or more images to a PDF file. Each image becomes one page.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
files | File[] | Required | Image files (JPG, PNG, WebP) |
PDF filecurl -X POST https://freefiletools.io/api/img-to-pdf \
-H "x-api-key: fft_your_api_key" \
-F "[email protected]" \
-F "[email protected]" \
-F "[email protected]" \
-o images.pdfPDF to PDF/A
/api/pdf-to-pdfaConvert a PDF file to PDF/A format for long-term archiving. Uses Ghostscript for conversion.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | PDF file to convert |
PDF/A filecurl -X POST https://freefiletools.io/api/pdf-to-pdfa \
-H "x-api-key: fft_your_api_key" \
-F "[email protected]" \
-o document-pdfa.pdf