How to Password-Protect a PDF Online — Free Encryption
Protecting a PDF with a password encrypts the file so that it cannot be opened without the correct credentials. This is the standard way to secure sensitive documents before sharing them digitally — financial statements, legal contracts, medical records, confidential reports, or personal identification documents. The recipient needs the password to open the file; without it, the contents are inaccessible.
AES-256 encryption — what it means
This tool uses PDF-lib to apply AES-256 encryption, which is the same standard used by banks, governments, and enterprise security systems. AES-256 encrypts every byte of the PDF content using a 256-bit key derived from your password. A brute-force attempt on a strong password with this encryption level would take longer than the age of the universe — making AES-256 protected PDFs effectively unbreakable in practice.
Choosing a strong password
The strength of PDF encryption depends entirely on your password. A short or common password can be cracked by dictionary attacks even with strong encryption. Use a password of at least 12 characters combining uppercase, lowercase, numbers, and symbols. Avoid real words, names, or dates. Store the password separately from the file — if you lose it, the content is permanently inaccessible because encryption is designed to be irreversible without the key.
Browser-based encryption — your file never leaves your device
All encryption runs in your browser using PDF-lib. The PDF is read from your local storage, encrypted in memory, and written back as a Blob download. Nothing is transmitted to any server. This is particularly important for highly sensitive documents — the encryption happens offline, with no third-party involved in the process.
When to use password protection vs. other security measures
Password protection prevents unauthorised opening of the file. For preventing printing or copying of text, PDF permissions flags (a separate feature) would be needed. For documents that need to be shared with a group, consider using a file-sharing platform with access control rather than a shared password. For documents you want to make permanently unreadable, deletion is more reliable than encryption.
Related PDF tools
Already have a protected PDF you need to open? Use the PDF unlock tool to remove the password when you know it. To add a visible confidentiality notice, use the PDF watermark tool. To reduce size before emailing, use PDF compression.