How to protect a PDF
Set a password & permissions, download.
Select a PDF
Read locally.
Set password
+ choose permissions.
Download
Encrypted PDF.
What "password protect PDF" actually means
Password protecting a PDF means encrypting the file so that opening or editing it requires the correct password. Without it, the bytes are unreadable garbage to every PDF viewer. People reach for password protection when sending sensitive material over email or sharing files in cloud storage where the link itself might leak — contracts, payslips, medical records, board papers, tax returns. Encrypting at the file level means the protection travels with the file no matter where it ends up.
Beyond simple open-password access, PDFs also support permission flags: you can let a reader open the document but prevent them from printing it, copying its text, editing, annotating, or filling forms. That granularity is useful for controlled distribution where you want the document read but not redistributed in modified form.
How protect PDF works in your browser
When you drop a PDF, our code reads it into memory locally. You set a password, confirm it, pick which permissions are allowed, and choose AES-128 or AES-256 encryption. pdf-lib then derives an encryption key from your password using the PDF standard\'s key-derivation process, writes encrypted versions of every stream and string in the PDF, and adds a security dictionary describing what the password allows.
Everything happens in your browser tab. The password and the PDF bytes never leave your device. Run the tool offline once the page is loaded — encryption still works, because the AES implementation ships as part of the JavaScript bundle. There is no upload, no log, and no server-side copy.
AES-128 vs AES-256: which to pick
AES-256 uses a 256-bit key derived from your password and is the current default for new PDFs across Adobe, Microsoft, and most security-focused tools. AES-128 uses a 128-bit key. Mathematically, both are well beyond reach of brute force when paired with a strong password — a modern attacker cannot crack either by guessing keys. The practical difference comes down to:
- Compatibility: AES-128 works in older PDF readers (some pre-2017 enterprise tools). AES-256 needs a reasonably modern reader.
- Future-proofing: AES-256 has a larger margin against future cryptanalytic improvements, useful for documents you expect to encrypt for the long term.
- Speed: AES-128 is slightly faster, but the difference is invisible for typical document sizes.
For most users, AES-256 is the right pick. Drop to AES-128 only when you know the recipient is using an older PDF tool.
What protect does NOT protect against
PDF password protection is excellent at stopping casual access — someone who finds the file in a misdirected email or a leaked cloud link cannot read it without the password. But it is not a digital rights management system. Be honest about the limits:
- Screenshots. A recipient who can open the file can screenshot any page. Copy restrictions do not stop screenshot tools at the OS level.
- OCR of an unlocked copy. If someone opens the file and then prints to a new PDF, the new copy is unprotected. Permission flags inside the original PDF do not survive re-rendering.
- Password sharing. The password is only as secure as the channel you send it through. If you email both the PDF and the password to the same address, both are intercepted together.
- Lost passwords. Strong encryption is a two-way street — if you forget the password, the file is unrecoverable. Keep a record in a password manager.
Common use cases for Protect PDF
- Sending HR documents. Payslips, employment contracts, and reviews stay encrypted in transit and in the recipient\'s inbox until they enter the password.
- Sharing financial reports. Board packs, quarterly numbers, and forecast models are encrypted at the file level — the protection survives forwarding.
- Distributing legal drafts. Contracts under negotiation can be locked from edits and copy while remaining readable, useful for one-way reviews.
- Protecting medical records. Patient files sent over email must be encrypted in most jurisdictions — a password-protected PDF satisfies the basic requirement.
- Personal archive on cloud storage. Encrypt sensitive tax returns and ID documents before uploading to consumer cloud drives where access control is harder to guarantee.
Privacy & security
Protect is exactly the operation where in-browser processing matters most: you are pairing a sensitive document with a password you don\'t want anyone else to ever see. Most online protect-PDF services upload both the file and the password to their servers, ask you to trust their retention promises, and process the encryption there. imisspdf does the entire encryption locally — neither the PDF nor the password ever touches a server. See our iLovePDF privacy review for the standard upload-based comparison.
Frequently asked questions
AES-256 is mathematically stronger and is now the default for new PDFs across Adobe and most security tools. AES-128 is still considered safe for most everyday business documents and produces slightly smaller files; modern brute-force is not a realistic risk against either with a strong password. Pick AES-256 for documents with longer-term sensitivity (contracts, medical records, archival files) and AES-128 if you need maximum compatibility with very old PDF readers.
A user password (also called open password) is what stops anyone from opening the PDF — without it the file cannot be read. An owner password restricts what readers can do once opened: print, copy text, edit, annotate. This tool sets a single password that unlocks both the open and owner restrictions, with the permission checkboxes controlling what is allowed without that password. For most cases that single combined password is what you actually want.
Strong enough to resist offline brute-force. Use at least 12 characters with a mix of upper case, lower case, digits, and a symbol. Avoid dictionary words and personal information. The strength indicator above the button reads "Strong" when these conditions are met — once it does, the password is realistically secure against modern attacks for years. Never email the password alongside the PDF; send it through a different channel.
Two things, mainly. First, screenshots: once a recipient opens the file, they can screenshot any page regardless of copy restrictions. Second, OCR or re-conversion: a recipient can re-render the PDF and run OCR on the result, producing an unprotected text copy. PDF protection is excellent for stopping casual access and accidental sharing — it is not a digital rights management system.
Yes. The PDF and the password you type both stay inside your browser. pdf-lib generates the AES key and writes the encrypted PDF locally — no upload happens, no log is kept, no copy is retained. You can verify by running the tool offline once the page has loaded.
Tips for strong PDF password protection
- Use 12+ character passwords. Mix upper case, lower case, digits, and a symbol. Avoid dictionary words and personal data. Aim for the strength indicator to read "Strong" before clicking Protect.
- Send the password through a different channel. If the PDF goes by email, send the password by phone, SMS, or chat — not as a follow-up email to the same address.
- Store the password in a manager. If you forget it, the file is unrecoverable. A password manager entry tied to the file name keeps you covered.
- Allow only what you need. Default to unchecking Copying and Editing for distribution-only documents. Leave Printing and Form Filling on if the recipient genuinely needs them.
- Re-protect after editing. If you unlock a PDF for an edit pass, run it through Protect PDF again afterwards. The unlocked copy on your machine is also worth deleting.
Related PDF tools
- Unlock PDF — the inverse: remove a known password from a protected PDF.
- Sign PDF — sign a PDF before locking it with a password.
- Redact PDF — permanently remove sensitive content before encrypting.
- Merge PDF — combine sensitive PDFs into one document, then protect the result.