API Documentation

All endpoints accept multipart/form-data uploads and return the processed file directly in the response body — no polling, no job IDs. Nothing is stored on either end.

Base URL: https://api.pdffever.com (use http://localhost:5000 for local development)

GET/status

Health Check

Returns service status. Useful for uptime checks and confirming the API is reachable.

Response: { "status": "ok", "service": "pdffever-backend" }

cURL

curl https://api.pdffever.com/status

JavaScript

const res = await fetch("https://api.pdffever.com/status");
const data = await res.json();
POST/convert

Convert to PDF

Converts one or more PNG/JPEG images into a PDF. By default each image becomes its own page sized to match it, in submission order. Set pageSize to fit images onto a standard page size instead, or mergeIntoOnePage to combine every image onto one shared page as a grid. Free plan: 25 MB per file, 50 MB total per batch.

FieldTypeRequiredDescription
filesPNG or JPEG files (repeated)Yes1 or more images, max 25 MB each. Free plan: 50 MB combined per batch (not a file-count limit).
pageSizestring: auto | a4 | letter | legalNoDefaults to auto (page sized to each image). A named size fits the image within that page, centered. Ignored (treated as a4) when mergeIntoOnePage is true.
mergeIntoOnePagestring: "true" | "false"NoWhen "true", combines all images onto one shared page as a grid instead of one page per image. Defaults to "false".
orientationstring: auto | portrait | landscapeNoOnly applies when pageSize isn't auto. "auto" matches each page to its own image's orientation (or defaults the shared page to portrait when merging). Defaults to "auto".
imageSizestring: fit | medium | smallNoOnly applies when pageSize isn't auto. How much of the page (or grid cell, when merging) the image occupies. Defaults to "fit".

Response: application/pdf — the converted file, streamed directly in the response body.

cURL

curl -F "files=@photo1.png" -F "files=@photo2.jpg" -F "pageSize=a4" -F "imageSize=medium" https://api.pdffever.com/convert -o output.pdf

JavaScript

const formData = new FormData();
formData.append("files", fileA);
formData.append("files", fileB);
formData.append("pageSize", "a4");
formData.append("orientation", "landscape"); // optional, defaults to auto
formData.append("imageSize", "medium"); // optional, defaults to fit
// formData.append("mergeIntoOnePage", "true"); // to combine onto one page

const res = await fetch("https://api.pdffever.com/convert", {
  method: "POST",
  body: formData,
});
const pdfBlob = await res.blob();
POST/merge

Merge PDFs

Combines two or more PDFs into one, in the order they're submitted. Free plan: up to 10 PDFs per merge.

FieldTypeRequiredDescription
filesPDF files (repeated)YesAt least 2 PDFs, up to 20 (10 on the free plan), max 25 MB each.

Response: application/pdf — the merged file.

cURL

curl -F "files=@a.pdf" -F "files=@b.pdf" https://api.pdffever.com/merge -o merged.pdf

JavaScript

const formData = new FormData();
formData.append("files", fileA);
formData.append("files", fileB);

const res = await fetch("https://api.pdffever.com/merge", {
  method: "POST",
  body: formData,
});
const pdfBlob = await res.blob();
POST/compress

Compress PDF

Re-encodes each PDF's embedded JPEG images at a lower quality to shrink file size. Each file is compressed independently; a single file returns a PDF, multiple files return a ZIP. Free plan: up to 10 files per batch.

FieldTypeRequiredDescription
filesPDF files (repeated)Yes1 or more PDFs, up to 20 (10 on the free plan), max 25 MB each.
qualityinteger, 10–90NoJPEG re-encode quality. Lower = smaller file. Defaults to 60.

Response: application/pdf (single file) or application/zip (multiple files).

cURL

curl -F "files=@report1.pdf" -F "files=@report2.pdf" -F "quality=40" https://api.pdffever.com/compress -o compressed.zip

JavaScript

const formData = new FormData();
formData.append("files", fileA);
formData.append("files", fileB);
formData.append("quality", "40");

const res = await fetch("https://api.pdffever.com/compress", {
  method: "POST",
  body: formData,
});
const blob = await res.blob(); // application/pdf or application/zip
POST/secure

Secure PDF

Adds password encryption and/or a watermark to a PDF. At least one of password or watermark is required.

FieldTypeRequiredDescription
filePDF fileYesThe PDF to secure. Max 25 MB.
passwordstringNoIf set, required to open the resulting PDF.
watermarkstringNoIf set, drawn diagonally across every page.

Response: application/pdf — the secured file.

cURL

curl -F "file=@report.pdf" -F "password=hunter2" -F "watermark=CONFIDENTIAL" https://api.pdffever.com/secure -o secured.pdf

JavaScript

const formData = new FormData();
formData.append("file", fileInput.files[0]);
formData.append("password", "hunter2");
formData.append("watermark", "CONFIDENTIAL");

const res = await fetch("https://api.pdffever.com/secure", {
  method: "POST",
  body: formData,
});
const pdfBlob = await res.blob();
POST/unlock

Unlock PDF

Removes password protection from a PDF, given the correct password. If the PDF isn't encrypted, it's returned unchanged.

FieldTypeRequiredDescription
filePDF fileYesThe PDF to unlock. Max 25 MB.
passwordstringNoThe PDF's current password. Required if the file is encrypted.

Response: application/pdf — the unlocked file.

cURL

curl -F "file=@locked.pdf" -F "password=hunter2" https://api.pdffever.com/unlock -o unlocked.pdf

JavaScript

const formData = new FormData();
formData.append("file", fileInput.files[0]);
formData.append("password", "hunter2");

const res = await fetch("https://api.pdffever.com/unlock", {
  method: "POST",
  body: formData,
});
const pdfBlob = await res.blob();
POST/edit/thumbnails

Get PDF Page Thumbnails

Returns a small preview image for every page of a PDF, in page order — used to build a page-management UI before editing.

FieldTypeRequiredDescription
filePDF fileYesThe PDF to preview. Max 25 MB.

Response: { "pageCount": 3, "thumbnails": [{ "width": 270, "height": 360, "dataUri": "data:image/jpeg;base64,..." }, ...] }

cURL

curl -F "file=@document.pdf" https://api.pdffever.com/edit/thumbnails

JavaScript

const formData = new FormData();
formData.append("file", fileInput.files[0]);

const res = await fetch("https://api.pdffever.com/edit/thumbnails", {
  method: "POST",
  body: formData,
});
const { pageCount, thumbnails } = await res.json();
POST/edit

Edit PDF Pages

Reorders, rotates, and/or deletes pages in a PDF. Rebuilds the file from only the pages listed in `pages`, in the order given.

FieldTypeRequiredDescription
filePDF fileYesThe PDF to edit. Max 25 MB.
pagesJSON stringYesArray of { index, rotate? } — one entry per page to keep, in the desired final order. "index" is the page's 0-based position in the source file; "rotate" (0/90/180/270) adds to the page's existing rotation. Omitted pages are dropped.

Response: application/pdf — the edited file.

cURL

curl -F "file=@document.pdf" -F 'pages=[{"index":2,"rotate":90},{"index":0,"rotate":0}]' https://api.pdffever.com/edit -o edited.pdf

JavaScript

const formData = new FormData();
formData.append("file", fileInput.files[0]);
formData.append("pages", JSON.stringify([
  { index: 2, rotate: 90 },
  { index: 0, rotate: 0 },
]));

const res = await fetch("https://api.pdffever.com/edit", {
  method: "POST",
  body: formData,
});
const pdfBlob = await res.blob();
POST/word-to-pdf

Word to PDF

Converts one or more .docx documents to PDF. Free plan converts one file at a time — submitting more than one file requires a paid plan. Once past the free tier, combineIntoOne (default true) merges every file into one PDF, each starting on a new page; set to false to convert each file independently and download a ZIP.

FieldTypeRequiredDescription
files.docx files (repeated)Yes1 or more Word documents, up to 20, max 25 MB each. Free plan is limited to 1 file per request.
combineIntoOnestring: "true" | "false"NoWhen multiple files are submitted, merge into one PDF (default) or convert each separately into a ZIP.

Response: application/pdf (merged or single file) or application/zip (separately-converted files).

cURL

curl -F "files=@document1.docx" -F "files=@document2.docx" https://api.pdffever.com/word-to-pdf -o output.pdf
curl -F "files=@document1.docx" -F "files=@document2.docx" -F "combineIntoOne=false" https://api.pdffever.com/word-to-pdf -o output.zip

JavaScript

const formData = new FormData();
formData.append("files", fileA);
formData.append("files", fileB);
// formData.append("combineIntoOne", "false"); // to keep files separate, zipped

const res = await fetch("https://api.pdffever.com/word-to-pdf", {
  method: "POST",
  body: formData,
});
const blob = await res.blob(); // application/pdf or application/zip
POST/excel-to-pdf

Excel to PDF

Converts one or more .xlsx workbooks to PDF, one page per sheet. Free plan converts one file at a time — submitting more than one file requires a paid plan. Once past the free tier, combineIntoOne (default true) merges every workbook into one PDF; set to false to convert each file independently and download a ZIP.

FieldTypeRequiredDescription
files.xlsx files (repeated)Yes1 or more Excel workbooks, up to 20, max 25 MB each. Free plan is limited to 1 file per request.
combineIntoOnestring: "true" | "false"NoWhen multiple files are submitted, merge into one PDF (default) or convert each separately into a ZIP.

Response: application/pdf (merged or single file) or application/zip (separately-converted files).

cURL

curl -F "files=@workbook1.xlsx" -F "files=@workbook2.xlsx" https://api.pdffever.com/excel-to-pdf -o output.pdf

JavaScript

const formData = new FormData();
formData.append("files", fileA);
formData.append("files", fileB);

const res = await fetch("https://api.pdffever.com/excel-to-pdf", {
  method: "POST",
  body: formData,
});
const blob = await res.blob(); // application/pdf or application/zip
POST/powerpoint-to-pdf

PowerPoint to PDF

Converts one or more .pptx presentations to PDF, preserving slide layout, tables, images, and basic text formatting. An approximation, not a full PowerPoint renderer — theme fonts/colors, animations, and complex graphics aren't reproduced. Free plan converts one file at a time — submitting more than one file requires a paid plan. Once past the free tier, decks are each rendered separately (they can use different slide sizes); combineIntoOne (default true) then merges those PDFs, or set to false to download a ZIP of the separately-rendered PDFs.

FieldTypeRequiredDescription
files.pptx files (repeated)Yes1 or more PowerPoint presentations, up to 20, max 25 MB each. Free plan is limited to 1 file per request.
combineIntoOnestring: "true" | "false"NoWhen multiple files are submitted, merge into one PDF (default) or convert each separately into a ZIP.

Response: application/pdf (merged or single file) or application/zip (separately-converted files).

cURL

curl -F "files=@deck1.pptx" -F "files=@deck2.pptx" https://api.pdffever.com/powerpoint-to-pdf -o output.pdf

JavaScript

const formData = new FormData();
formData.append("files", fileA);
formData.append("files", fileB);

const res = await fetch("https://api.pdffever.com/powerpoint-to-pdf", {
  method: "POST",
  body: formData,
});
const blob = await res.blob(); // application/pdf or application/zip
POST/html-to-pdf

HTML to PDF

Renders one or more uploaded .html files, or a live webpage URL, to PDF. Provide exactly one of files or url. For files, CSS is applied and scripts are not executed; multiple files are each rendered separately (each is a standalone document), then combineIntoOne (default true) merges those PDFs, or set to false to download a ZIP of the separately-rendered PDFs. For url, the page renders like a real browser (JavaScript runs); only public http(s) URLs are accepted — private/internal/loopback addresses are rejected.

FieldTypeRequiredDescription
files.html files (repeated)No1 or more HTML files, up to 20, max 25 MB each. Omit if using url.
combineIntoOnestring: "true" | "false"NoWhen multiple files are submitted, merge into one PDF (default) or convert each separately into a ZIP.
urlstringNoPublic http:// or https:// URL to render. Omit if using files.

Response: application/pdf (merged, single file, or rendered URL) or application/zip (separately-rendered files).

cURL

curl -F "files=@page1.html" -F "files=@page2.html" https://api.pdffever.com/html-to-pdf -o output.pdf
curl -F "url=https://example.com" https://api.pdffever.com/html-to-pdf -o output.pdf

JavaScript

const formData = new FormData();
formData.append("files", fileA);
formData.append("files", fileB);
// or: formData.append("url", "https://example.com");

const res = await fetch("https://api.pdffever.com/html-to-pdf", {
  method: "POST",
  body: formData,
});
const blob = await res.blob(); // application/pdf or application/zip
POST/batch

Batch Convert

Converts multiple PNG/JPEG images to PDF and returns them all as a single ZIP.

FieldTypeRequiredDescription
filesPNG or JPEG files (repeated)YesUp to 20 images, max 25 MB each.

Response: application/zip — one PDF per input image, plus an errors.txt if any file failed to convert.

cURL

curl -F "files=@a.png" -F "files=@b.jpg" https://api.pdffever.com/batch -o converted.zip

JavaScript

const formData = new FormData();
formData.append("files", fileA);
formData.append("files", fileB);

const res = await fetch("https://api.pdffever.com/batch", {
  method: "POST",
  body: formData,
});
const zipBlob = await res.blob();
POST/pdf-to-jpg

PDF to JPG

Rasterizes every page of one or more PDFs to JPG images. Returns a single JPG when there's exactly one page total, or a ZIP of one JPG per page otherwise (filenames are prefixed with the source file's name when multiple PDFs are submitted).

FieldTypeRequiredDescription
filesPDF files (repeated)Yes1 or more PDFs to rasterize, up to 20, max 25 MB each.

Response: image/jpeg (single page) or application/zip (multiple pages) — one JPG per page.

cURL

curl -F "files=@document1.pdf" -F "files=@document2.pdf" https://api.pdffever.com/pdf-to-jpg -o output.zip

JavaScript

const formData = new FormData();
formData.append("files", fileA);
formData.append("files", fileB);

const res = await fetch("https://api.pdffever.com/pdf-to-jpg", {
  method: "POST",
  body: formData,
});
const blob = await res.blob(); // image/jpeg or application/zip
POST/pdf-to-pdfa

PDF to PDF/A

Converts one or more PDFs to PDF/A by embedding an sRGB output-intent color profile and PDF/A conformance metadata. Best-effort — not veraPDF-certified compliance. Encrypted PDFs are rejected; unlock them first. Multiple files: combineIntoOne (default true) merges every PDF into one PDF/A; set to false to convert each file independently and download a ZIP.

FieldTypeRequiredDescription
filesPDF files (repeated)Yes1 or more PDFs to convert, up to 20, max 25 MB each.
conformancestring: 1B | 2B | 2U | 3B | 3UNoPDF/A conformance level to target. Defaults to 2B.
combineIntoOnestring: "true" | "false"NoWhen multiple files are submitted, merge into one PDF/A (default) or convert each separately into a ZIP.

Response: application/pdf (merged or single file) or application/zip (separately-converted files).

cURL

curl -F "files=@document1.pdf" -F "files=@document2.pdf" -F "conformance=2B" https://api.pdffever.com/pdf-to-pdfa -o output-pdfa.pdf

JavaScript

const formData = new FormData();
formData.append("files", fileA);
formData.append("files", fileB);
formData.append("conformance", "2B");

const res = await fetch("https://api.pdffever.com/pdf-to-pdfa", {
  method: "POST",
  body: formData,
});
const blob = await res.blob(); // application/pdf or application/zip
POST/pdf-to-excel

PDF to Excel

Extracts one or more PDFs' text into an .xlsx workbook, one sheet per page, grouping text by coordinate position into rows/columns. Works best for genuinely tabular, column-aligned PDFs — ordinary prose degrades to one cell per line. Multiple files: combineIntoOne (default true) merges every PDF's pages into one workbook; set to false to convert each file independently and download a ZIP.

FieldTypeRequiredDescription
filesPDF files (repeated)Yes1 or more PDFs to extract, up to 20, max 25 MB each.
combineIntoOnestring: "true" | "false"NoWhen multiple files are submitted, merge into one workbook (default) or convert each separately into a ZIP.

Response: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet (merged or single file) or application/zip (separately-converted files).

cURL

curl -F "files=@document1.pdf" -F "files=@document2.pdf" https://api.pdffever.com/pdf-to-excel -o output.xlsx

JavaScript

const formData = new FormData();
formData.append("files", fileA);
formData.append("files", fileB);

const res = await fetch("https://api.pdffever.com/pdf-to-excel", {
  method: "POST",
  body: formData,
});
const blob = await res.blob();
POST/pdf-to-word

PDF to Word

Extracts one or more PDFs' text into an editable .docx document. Text/paragraph extraction only — not a full layout reconstruction; tables, columns, and images are not preserved. Multiple files: combineIntoOne (default true) merges every PDF's extracted text into one document; set to false to convert each file independently and download a ZIP.

FieldTypeRequiredDescription
filesPDF files (repeated)Yes1 or more PDFs to extract, up to 20, max 25 MB each.
combineIntoOnestring: "true" | "false"NoWhen multiple files are submitted, merge into one document (default) or convert each separately into a ZIP.

Response: application/vnd.openxmlformats-officedocument.wordprocessingml.document (merged or single file) or application/zip (separately-converted files).

cURL

curl -F "files=@document1.pdf" -F "files=@document2.pdf" https://api.pdffever.com/pdf-to-word -o output.docx

JavaScript

const formData = new FormData();
formData.append("files", fileA);
formData.append("files", fileB);

const res = await fetch("https://api.pdffever.com/pdf-to-word", {
  method: "POST",
  body: formData,
});
const blob = await res.blob();
POST/pdf-to-powerpoint

PDF to PowerPoint

Converts one or more PDFs to a .pptx with one full-page image per slide. Preserves the exact visual look of each page, but slides are not editable text/shapes. Multiple files: combineIntoOne (default true) merges every PDF's pages into one deck (sized to the first PDF's first page, other pages fit-centered); set to false to convert each file independently (each sized to its own first page) and download a ZIP.

FieldTypeRequiredDescription
filesPDF files (repeated)Yes1 or more PDFs to convert, up to 20, max 25 MB each.
combineIntoOnestring: "true" | "false"NoWhen multiple files are submitted, merge into one deck (default) or convert each separately into a ZIP.

Response: application/vnd.openxmlformats-officedocument.presentationml.presentation (merged or single file) or application/zip (separately-converted files).

cURL

curl -F "files=@document1.pdf" -F "files=@document2.pdf" https://api.pdffever.com/pdf-to-powerpoint -o output.pptx

JavaScript

const formData = new FormData();
formData.append("files", fileA);
formData.append("files", fileB);

const res = await fetch("https://api.pdffever.com/pdf-to-powerpoint", {
  method: "POST",
  body: formData,
});
const blob = await res.blob();