Encrypt PDF icon showing a PDF document with a padlock in front of it.

Encrypt PDF

Encrypt PDF is a REST API tool that securely encrypts and protects all of the content within a PDF document, requiring the viewer to enter a password to access the contents of a document.

A bubbling flask with code brackets inside
Try Now with API Lab

Start right from your browser - upload files, choose parameters, generate code, and send API Calls directly from API Lab!  

to receive your free API Key.
Parameters
Required Parameters
POST
curl -X POST "https://api.pdfrest.com/encrypted-pdf" \ 
  -H "Accept: application/json" \ 
  -H "Content-Type: multipart/form-data" \
  -H "Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \
  
Response
The response for your API Call will display here.
Once you've sent your POST request and received a valid response, you can download your output file using the output URL.

Why is pdfRest the best API to encrypt PDF with password?

pdfRest offers the best solution for encrypting PDF documents with a password, because it supports automated security workflows, removing and changing passwords, and secure AES 256-bit encryption technology.

Automated Security Workflow

The pdfRest toolkit is purpose-built to easily integrate into both new and existing solutions the document management tools needed to transform your data into formats that are compatible and secure.

Encrypt PDF provides many ways for developers to automate the entire document lifecycle, and chainable API requests mean that once a file is uploaded once, many different tools can be used to shape what the final product is based on your requirements. Sensitive images can be uploaded once, converted to PDF format, encrypted with AES 256-bit security, and stored in whatever platform your policies require.

All of this and more is easy with pdfRest.

Change Passwords and Remove Encryption

A tool can have multiple functions and the Encrypt PDF API Tool is no exception. In the same way that a hammer can both drive and pull nails, Encrypt PDF can both secure a document as well as change existing security.

Provided that you have the existing password, you can change the password for distribution to different shareholders by supplying the current password and setting a new password with the /encrypted-pdf API endpoint. You can also use the /decrypted-pdf API endpoint to remove encryption entirely and open the document to be accessible to a wider audience.

Trust in Secure Encryption Technology

Modern businesses rely on many best-practices to secure their digital property. Whether it's in-transit, at-rest, file-level, or software-based, encryption is one of the largest areas of growth and pdfRest has a tool for that!

Powered by the Adobe® PDF Library™, with the same industry-leading security trusted by hundreds of thousands of companies world-wide, the pdfRest Encrypt PDF API Tool will help you rest easy knowing that your documents are safe and secure with AES 256-bit encryption, virtually impenetrable from brute-force attacks and even state-of-the-art quantum computing.
Start from Code Examples
  1. First, you'll need an API Key - to:
    • Stay anonymous with a Guest API Key for 10 free API Calls
    • Sign up for an upgraded API Key with unlimited, continuous service
  2. Choose your programming language
  3. Copy and paste the code to your project
  4. Update Api-Key field with your unique API Key
  5. Update file with the local path to your input
  6. Run this code to send an API Call
See more code examples in our
GitHub repository
Try pdfRest with just a few clicks
Download our Postman Postman Collection
curl -X POST "https://api.pdfrest.com/encrypted-pdf" \
  -H "Accept: application/json" \
  -H "Content-Type: multipart/form-data" \
  -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \
  -F "file=@../Sample_Input/toEncrypt.pdf" \
  -F "output=example_out" \
  -F "new_open_password=password"
Customize Your Solution
New Open Password
The new_open_password parameter allows you to enter a new open password for your PDF. An open password encrypts your PDF and prevents unauthorized users from viewing your document.
Generate a self-service API Key now!

Create your FREE API Key to start processing PDFs in seconds, only possible with pdfRest.

Compare Plans
Contact Us