Password-protect a PDF
Add a password to a PDF so only the right people can open it. FileAlloy encrypts PDFs with 256-bit AES through a fast, private API: send the file and a password, get an encrypted PDF back. Files and passwords are processed in memory and never stored, and there is a free tier to start.
Files and passwords are processed in memory and never stored.
How to use Password-protect a PDF
- Get a free API key Create an account at app.filealloy.com and generate a key. The free plan is enough to start.
- POST your PDF and password Send the file to /v1/protect with your key and the password to set.
- Get an encrypted PDF A password-protected PDF comes straight back in the response, ready to send securely.
Why FileAlloy
256-bit AES encryption
The PDF is encrypted with strong, standard AES so it can only be opened with the password.
Opens everywhere
The protected file works in any standard PDF reader that prompts for the password.
Password never logged
The file and password are used in memory and erased with the response, never stored or written to a log.
Private by default
Encryption happens on EU servers with no data retention, so sensitive documents stay yours.
Do it at scale with the API
Encrypting sensitive documents before you send or store them? The same operation is a single call to /v1/protect, so you can batch and automate it with no browser.
curl -X POST https://api.filealloy.com/v1/protect \
-H "X-API-Key: fa_live_your_key" \
-F "file=@document.pdf" \
-F "password=your-secret" \
-o protected.pdf Get an API key Frequently asked questions
How strong is the protection?
The PDF is encrypted with 256-bit AES, the standard strong encryption for PDF documents.
Is my password stored?
No. The file and password are processed in memory and deleted immediately after the response. We never log or keep them.
Will the file open in normal readers?
Yes. Any standard PDF reader will prompt for the password and then open the document.
What is the endpoint?
POST /v1/protect with the PDF and a password as multipart form data.
Can I remove a password later?
Yes, use the Unlock endpoint with the current password to remove protection.
Is there a free option?
Yes. The free plan includes a monthly request quota, with sub-cent pricing above it.