- HTML to PDF APIConvert HTML and URLs into PDFsPDF Form Fields APIAdd fillable fields to any PDFExtract PDF Form Data APIEasily extract data from PDFsWatermark PDF APIAdd custom watermarks to PDFsProtect PDF APISecure your PDFs with passwordCompress PDF APIReduce file size without losing qualityFlatten PDF APIFlatten PDFs to make form permanentDigital Signature APISend documents for signing
- API DocumentationAPI DocumentationFull REST API referenceNodeJS SDKClient library for Node.jsJava SDKClient library for JavaC# SDKClient library for C#PHP SDKClient library for PHPPython SDKClient library for Python
- Pricing
- Contact Us

Best PDF Encryption APIs in 2026
Compare 11 PDF encryption APIs, including their password protection, permissions, and pricing, to find a service that fits your application.
If your application sends PDFs that contain personal or financial information, you may want recipients to enter a password before they can open them. A PDF encryption API lets you add that protection when your application creates or processes a document, so you don't have to protect each file manually.
Some services handle encryption alongside PDF generation, while others let you upload an existing file and protect it. They also differ in the permissions you can set, whether they can remove passwords, and how much you pay as your document volume grows.
In this article, we'll compare eleven PDF encryption APIs, including their security options, pricing, and how you would use them in an application. We'll also look at services that encrypt PDFs during generation and libraries you can run on your own servers.
What to check before you choose
Before comparing providers, it helps to understand what you want to protect. Requiring a password to open a PDF keeps its contents from someone who doesn't have the password. Restricting printing or copying is different, because those restrictions depend on the PDF reader respecting them.
PDFs can have a user password and an owner password. The user password is the one you give recipients so they can open the file, while the owner password grants full access, including the ability to change permissions. Either can unlock the document, so keep the owner password private. If the user password is empty, anyone can open the PDF, even if you've set an owner password.
You can still ask a reader to prevent printing, copying, or editing, but those settings aren't a guarantee. An application that can decrypt the file can also ignore its permissions, and the qpdf manual states plainly that not all readers respect all restrictions. That remains true after someone opens a PDF with a user password, so permission settings should not be treated as a way to control what recipients do with content they can already read.
For encryption, look for AES-256 as the default or as an option you can select. Older PDFs may use RC4 with 40-bit or 128-bit keys, or AES-128. PDF 2.0 (ISO 32000-2) deprecates those older schemes and the earlier AES-256 revision 5 scheme, leaving AES-256 with security handler revision 6 as the recommended password encryption scheme in the base specification. The PDF Association publishes the relevant clause of the standard with its errata, which is the reference to cite if you need to justify the choice.
It's also worth checking whether you'll need to remove passwords later. For example, if customers upload protected documents, your application may need to decrypt them before doing any further processing. All eleven services below except PDFGate offer password removal, although the password they require can differ.
Finally, compare prices using the documents you expect to process. An API that charges per page can cost much more for a 200 page report than for a one page invoice, even though both take one request. Other providers charge per file or by processing time, so their headline quotas aren't directly comparable.
Compare features and pricing
The table below shows which services let you choose an algorithm, control permissions, and remove passwords. Some group several permissions into one setting, so the available controls matter more than the number of flags.
| API | Suited to | Algorithms | Permission controls | Removes a password | Free allowance | Entry paid option |
|---|---|---|---|---|---|---|
| PDFGate | Generating a PDF, then protecting it | AES-256 (default), AES-128 | Printing, copying, editing | No | 14-day trial | $9/month for 500 conversions |
| Adobe PDF Services | Separate controls for printing, forms, and editing | AES-128, AES-256 | Print quality, editing, assembly, annotations, forms, copying | Yes, owner password | 500 transactions/month | Contact sales |
| pdfRest | Separate encryption and restriction operations | AES-256 | Print quality, editing, assembly, annotations, forms, extraction | Yes | 100 calls/month, watermarked | $9.99/month for 600 calls |
| Nutrient DWS Processor | Combining document processing in one build | Not listed | Printing, editing, extraction, annotations, forms, assembly | Yes | About 66 protections/month ($5 of usage) | $75/month for about 1,200 protections |
| Foxit PDF Services | Teams already using other Foxit APIs | AES-128, AES-256, RC4 | Print quality, editing, assembly, annotations, forms, copying | Yes, user or owner password | 500 credits/year | $1,750/year for 5,000 credits |
| PDF.co | Choosing algorithms and individual permissions | RC4 40/128, AES-128 (default), AES-256 | Printing, forms, editing, extraction, annotations, assembly, accessibility | Yes | 10,000 trial credits advertised | $8.99/month billed annually for 16,500 credits/month |
| ConvertAPI | Converting other formats before encryption | RC4 40/128, AES-128, AES-256 (default) | Print quality, copying, editing, extraction, annotations, forms, assembly | Yes | 250 conversions | Developer, 1,000 conversions/month |
| CloudConvert | Jobs that import, convert, and export files | Not listed | Print quality, modification levels, extraction, accessibility | Yes | 10 credits/day | Packages and subscriptions, see current quote |
| Aspose.PDF Cloud | Applications already using Aspose cloud storage | RC4 40/128, AES-128, AES-256 | Printing, editing, extraction, annotations, forms, assembly | Yes | 150 calls/month | $30 for the next 1,000 calls |
| iLoveAPI | Task workflows with multiple PDF tools | Not listed | Printing, editing, copying, annotations, forms, assembly, accessibility | Yes | 2,500 credits/month | $38/month for 10,000 credits |
| PDF4me | One password with a permission preset | AES, not selectable | One permission preset per request | Yes | Limited free trial | $25 prepaid pack for 500 calls |
Prices use the provider's listed currency, with annual billing and prepaid packs identified where they apply.
PDF encryption APIs compared
1. PDFGate
PDFGate is our product. It provides APIs for generating PDFs from HTML, processing existing files, and collecting electronic signatures. If you're already generating documents through PDFGate, you can use its protect endpoint to add a password in a second call.
Once a document is ready, pass its documentId to the protect endpoint. This lets you encrypt it without downloading and uploading it again. You can also send an existing PDF directly, then receive the encrypted file or a JSON response containing a download link.
Encryption uses AES-256 by default, with AES-128 available if you need compatibility with older readers. Set userPassword to require a password when the file opens. When you use AES-256 with a user password, you must also provide a nonempty ownerPassword.
You can request restrictions on printing, copying, and editing through disablePrint, disableCopy, and disableEditing. These cover the main actions, but there are no separate settings for form filling, annotations, or print quality. Metadata remains readable unless you turn on encryptMetadata.
Because PDFGate cannot remove passwords or process encrypted input through its other processing endpoints, encryption needs to be your last step. For example, add a watermark or compress the file before protecting the finished document.
Plans start at $9/month for 500 conversions. The next plans are $20/month for 3,000 and $50/month for 10,000. A successful protect operation uses one conversion, while uploads, downloads, retrieval, failed operations, and sandbox requests don't use that allowance. There is a 14-day trial, and electronic signatures are priced separately.
SDKs are available for Node.js, Python, PHP, Java, and C#, so you can use the same SDK for generation and protection.
2. Adobe PDF Services API
Adobe PDF Services gives you more control over individual permissions than an API with a single setting for editing. For example, you can allow someone to fill in a form while restricting changes to the rest of the document. You can also allow low quality printing without allowing high quality output.
Its Protect PDF operation supports AES-128 and AES-256, with separate permissions for editing, page assembly, annotations, form filling, and copying. If you need to reverse the protection later, Remove Protection requires the document's owner password.
The integration involves a few steps. You upload the PDF, start a protection job, then check for completion before downloading the result. Adobe provides SDKs for Java, .NET, Node.js, and Python to help with those requests, and files can be up to 100 MB.
You get 500 free document transactions each month. Protecting a file counts as one transaction regardless of its length, which makes the allowance easier to estimate for documents with varying page counts. Paid pricing is available through sales.
3. pdfRest
pdfRest is built by Datalogics on the Adobe PDF Library. It handles opening passwords and permission restrictions through separate operations, so the calls you make depend on the protection you need.
To require a password when a document opens, use encrypted-pdf. If you also want restrictions on printing or editing, follow it with restricted-pdf and a permissions password. Applying both therefore takes two processing calls. You can reverse them through decrypted-pdf and unrestricted-pdf when you have the required passwords.
Encryption uses AES-256, and the permission controls include print quality, editing, extraction, annotations, forms, and page assembly. The toolkit is also sold as a self-hosted container if you need to run it in your own environment.
The free Starter plan includes 100 calls a month with watermarked output. Paid monthly plans are $9.99 for 600 calls, $99.99 for 5,000, and $349.99 for 15,000. Premium overage costs $0.115 per call. Since requests that require an API key count toward usage, allow for supporting calls as well as the protection operations.
4. Nutrient DWS Processor API
Nutrient, formerly PSPDFKit, lets you describe several document operations in one request. You could merge files, run OCR, and add a watermark, then apply password protection to the output. This can simplify an integration that would otherwise make a separate request for each step.
Passwords and permissions are part of the output settings. You set user_password and owner_password, then use user_permissions to allow actions such as printing, editing, extraction, annotations, form filling, accessibility, and page assembly. If your input is already encrypted, you can supply its password and produce an unprotected output.
The security guide does not specify an encryption algorithm or key length. If you need a documented guarantee of a particular scheme, confirm it with Nutrient before building the integration.
Plans include a dollar amount of usage rather than a number of files, and each operation has its own price. Password protection costs $0.075 per document. The Free plan includes $5 of usage a month, which covers about 66 protected documents. Starter costs $75/month for $90 of usage, or about 1,200 documents, and Growth costs $275 for $345, or about 4,600. Those counts only hold if the request does nothing else. OCR, watermarking, or other steps in the same request are each billed at their own rate.
5. Foxit PDF Services API
Foxit offers password protection as part of its hosted PDF Services API. If you also use its document generation or eSign services, they share the same account and credit pool, although the cost of each operation can differ.
You can protect files up to 100 MB using AES-128, AES-256, or RC4, and choose whether to encrypt metadata. Permissions cover print quality, editing, page assembly, annotations, forms, and copying. Foxit also accepts either the user or owner password when removing protection, which gives you more flexibility than Adobe's owner-password requirement.
The API exposes these operations as pdf-protect and pdf-remove-password, with AES_128, AES_256, and RC4 as cipher values. You can integrate through REST or use its MCP server.
Foxit's plans are annual. Developer includes 500 free credits a year, while Startup costs $1,750 for 5,000 and Business costs $4,500 for 15,000. Each successful protection operation uses one credit, and uploads, downloads, and status polling are free. If you share the allowance with other Foxit services, include those operations in your estimate too.
6. PDF.co
PDF.co gives you separate user and owner passwords, along with individual controls for printing, forms, editing, extraction, annotations, assembly, and accessibility. You can also choose low or high resolution printing through printQuality.
It supports AES-128 and AES-256 as well as the older 40-bit and 128-bit RC4 options. Because AES-128 is the default, you need to select AES-256 explicitly if that's what you want. A separate operation removes protection.
The pricing needs a little more attention if your documents are long. In synchronous mode, adding or removing protection costs 3 credits per page, so protecting a 50 page report uses 150 credits. Uploads and status checks can add to that total.
The entry plan includes 16,500 credits a month for $9.99 with monthly billing, or $8.99 per month when paid annually. The larger annual plans work out to $22.49 per month for 37,000 credits and $44.99 for 80,500. PDF.co also advertises 10,000 trial credits.
7. ConvertAPI
ConvertAPI handles encryption as another conversion in its API. For example, if your application starts with a Word document, you can convert it to PDF and pass the resulting FileId into a protection request. You don't need to download the intermediate file.
Protection uses AES-256 by default. Through EncryptionAlgorithm, you can also select AES-128 or an older RC4 handler. UserPassword and OwnerPassword let you set the passwords separately, while EncryptMeta controls whether metadata is encrypted.
The permission settings cover printing, copying, modification, extraction, annotations, forms, and assembly. If you need an unprotected copy later, there is a corresponding pdf to unprotect operation.
New accounts get 250 free conversions, and the Developer plan includes 1,000 conversions a month, with a larger allowance on annual billing. One billing detail to keep in mind is that failed conversions count too. The terms also set a minimum overage charge of 20 conversions, even if you exceed your plan by fewer than that.
8. CloudConvert
With CloudConvert, you can put file transfers and PDF processing in the same job. A job could fetch a document from S3, convert it to PDF, encrypt it, and upload the result back. Your application submits the job instead of managing each transfer itself.
Its encryption and decryption tasks let you set separate opening and owner passwords, choose full quality or low quality printing, or disable printing. For modifications, you can allow all changes or limit them to annotations, forms, or page assembly. Extraction and accessibility have their own settings, but the documented options do not let you select an encryption algorithm.
The free plan gives you 10 credits a day. After that, you can choose a monthly subscription or prepaid credits that don't expire. General processing starts at one credit, with additional credits for longer processing. Since a job may contain several billable tasks, estimate the whole job rather than just its encryption step.
9. Aspose.PDF Cloud
Aspose.PDF Cloud lets you encrypt a PDF already held in its cloud storage or send the file content directly. That gives you a choice between keeping documents in an existing Aspose integration and protecting a file as it arrives. You can also decrypt documents and change their passwords.
The cryptoAlgorithm parameter accepts RC4x40, RC4x128, AESx128, or AESx256, and usePdf20 selects the newer revision 6 security handler. Passwords are passed as Base64 encoded values. That encoding does not add security by itself, so it should not be confused with encryption.
You can set permissions for printing, editing, extraction, annotations, forms, accessibility, and assembly. As with the other providers, these settings tell PDF readers which actions to allow after opening.
The first 150 API calls each month are free. The next 1,000 cost a flat $30, and the following 14,000 cost $0.09 each. When estimating usage, confirm whether the upload and download requests in your integration are billed as well as the encryption call.
10. iLoveAPI
iLoveAPI is the developer API behind iLovePDF. You start a task, upload the files, and process them before downloading the result. Tasks can be chained, and webhooks let your application know when processing has finished.
Its protect tool takes an opening password and a separate owner_password. You can then set permissions for actions such as printing, editing, and copying, or use allow_nothing to request all restrictions at once. To remove protection, use unlock with the password for each file.
The documentation does not name the encryption algorithm, so you would need to confirm that if a specific scheme is required. Billing is clearer. Both protect and unlock use 10 credits per file, regardless of page count.
That means the free allowance of 2,500 credits a month covers 250 protection operations. Starter costs $38/month for 10,000 credits, enough for 1,000, while Pro starts at $98/month for 25,000 credits. If you also convert or process documents through iLoveAPI, those tools use the same balance.
11. PDF4me
PDF4me asks for one password and a permission preset. For example, you can require a password to open a form and choose Fill Forms to let recipients complete it. This is simpler to configure than setting each permission individually, but it gives you less control over combinations of allowed actions.
The Protect endpoint takes password and pdfPermission, with options including None, Copy, Fill Forms, and Digital Print for low resolution printing. It uses AES but does not let you choose the key length or provide distinct user and owner passwords. An Unlock endpoint removes protection when you supply the password.
You can try it with a limited free allowance, then choose a subscription or prepaid calls. Prepaid packs start at $25 for 500 calls and do not expire, with one call used for each document you protect.
Encrypting while generating the PDF
If you generate PDFs from HTML, you may be able to add protection in the same request. That saves a second API call and avoids passing the finished PDF to another service. Our HTML to PDF API roundup compares the same services on rendering, limits, and pricing.
PDFShift lets you include user and owner passwords in a protection object when rendering HTML. You can also request restrictions through no_print, no_copy, and no_modify. It documents 128-bit encryption, with plans starting at $9/month for 500 credits.
PDFCrowd supports encryption during HTML to PDF conversion and through its PDF to PDF API for existing files. You can set user_password and owner_password, enable encrypt, and use no_print, no_modify, and no_copy for restrictions. Its algorithm is not listed, and plans start at $11/month for 200 credits.
DocRaptor passes encryption settings through to Prince. Alongside user and owner passwords, you can request restrictions on printing, copying, annotations, and modifications. Its documented key_bits options are 40 and 128, so it does not offer AES-256 through those settings. Plans start at $15/month for 125 documents.
For a generated document that only needs an opening password, PDFMonkey accepts _password in the document metadata and encrypts the output with AES-256. It is available on every plan, including the free plan, but there are no individual permission flags.
Not every generation service includes protection in the rendering request. With PDFGate, you generate the PDF first and pass its documentId to a second call for encryption. Api2Pdf also has a separate password endpoint for existing files, without permission flags.
Plan limits can matter here too. CraftMyPDF offers password protection only from its Professional plan at $99/month. If you already use a generation service, check its protection options before adding another provider.
SDKs and open source libraries
A hosted API means sending your document to another service. If the files need to stay on your servers, a local library or self-hosted service may be a better fit. Apryse, formerly PDFTron, and Nutrient sell commercial SDKs with AES-256 support. Apryse advertises entry packages from $1,500, although the price depends on the platform and features you need.
You can also use qpdf from the command line. It encrypts and decrypts files with 40, 128, or 256-bit keys. For new files, choose 256-bit AES unless you need compatibility with an older reader.
If you prefer a library in your application's language, pypdf supports AES-256 in Python with an additional cryptography dependency. In Go, pdfcpu uses AES-256 by default. Apache PDFBox supports 256-bit keys in Java, but its 3.0.5 protection policy defaults to 40-bit, so you need to set the key length explicitly.
iText is another option, with AES-256 and newer AES-GCM support under AGPL or a commercial licence. If you use pdf-lib in JavaScript, however, it cannot handle encrypted documents. Finish your edits with pdf-lib first, then protect the result using a compatible library, qpdf, or an API.
What would it cost to protect your documents?
Suppose you need to protect 100 PDFs a month and each has 50 pages. PDFGate would use 100 conversions. PDF.co would use 15,000 credits at its synchronous rate of 3 credits per page, while iLoveAPI would use 1,000 credits at 10 per file. These figures cover protection alone, before any upload, polling, or other processing charges.
All three could cover that workload with their entry allowances, but the amount you would pay differs. PDFGate's $9/month plan includes 500 conversions. PDF.co's 16,500-credit plan costs $9.99 with monthly billing or $8.99 per month billed annually. The same workload fits within iLoveAPI's 2,500 free monthly credits.
This is why it helps to compare your expected page count as well as your monthly document volume. If you also generate PDFs, run OCR, or remove passwords, include those operations before deciding which allowance will cover your application.
Which PDF encryption API should you choose?
If you already generate or process PDFs through an API, start by checking whether that provider can protect the result. PDFGate, Nutrient, ConvertAPI, and CloudConvert all let you pass documents between generation or processing and encryption, which can save you from maintaining another integration.
If you need separate controls for form filling, annotations, or print quality, compare those settings directly. Adobe and pdfRest provide these controls, while services such as PDF4me group permissions into presets. For password removal, check which password you'll have. Adobe requires the owner password, whereas Foxit accepts either.
Where a specific algorithm is required, choose a service that lets you select it or documents what it uses. PDFGate, Adobe, Foxit, PDF.co, ConvertAPI, and Aspose all expose algorithm options. Before committing, try a document like the ones your application will send and open the result in the readers your recipients use.
Features and prices were last reviewed on November 17, 2026.