How to password protect a PDF
- Drop your PDF into the tool above, or click to browse your device.
- Enter a password and confirm it. Choose your permissions — allow printing, copying, or modifying.
- Click "Protect PDF" and download your encrypted document. Everything runs in your browser — nothing is uploaded.
How PDFly protects your PDF
PDFly uses the pdf-lib library to apply strong encryption to your PDF. Here's how it works:
- Standard PDF encryption: Your PDF is encrypted using the PDF Standard Security Handler (RC4, 40-bit), the same encryption format built into the PDF specification since version 1.1 and supported by virtually every PDF reader, including older ones.
- User password: The password you set is required to open the document. Without it, the file is unreadable.
- Owner password: An additional owner password is generated automatically to manage permissions like printing, copying, and editing.
- Permission controls: You can restrict printing (low or high quality), copying text, and modifying the document.
The encryption happens entirely in your browser — your password and file data never leave your device.
Why protect a PDF with a password?
- Business contracts and reports: Ensure only authorized parties can view sensitive business information.
- Financial statements and tax documents: Protect personal and financial data from unauthorized access.
- Legal documents and certificates: Add an extra layer of security to official paperwork.
- Medical records: Comply with privacy requirements by protecting health information.
- Email attachments: Send sensitive PDFs securely by sharing the password separately.
- Cloud storage: Even if your cloud account is compromised, encrypted PDFs remain protected.
Understanding permissions
- Allow printing: When checked, users can print the document. If unchecked, most PDF readers will disable the print function.
- Allow copying text: When unchecked, text selection and copying are disabled in compatible PDF readers.
- Allow modifying: When unchecked, most PDF readers restrict editing, adding annotations, or filling forms.
Important: Permission restrictions depend on the PDF reader being used. Some readers may not enforce all permissions, so treat them as a helpful deterrent rather than absolute protection.
Choosing a strong password
- Length matters: Use at least 12 characters. Longer passwords are harder to crack.
- Mix character types: Combine uppercase and lowercase letters, numbers, and symbols (e.g.,
MyS3cur3P@ssw0rd!).
- Avoid common words: Don't use "password," "123456," or easily guessable phrases.
- Use a password manager: Consider using a password manager to generate and store strong, unique passwords.
Before you protect your PDF
- Save your password: Store it in a password manager or write it down and keep it secure. There's no recovery option.
- Test the protected file: After downloading, try opening it with the password to confirm it works correctly.
- Keep the original: The original file remains unchanged. Keep a copy in case you need an unprotected version.
- Share the password separately: If emailing the protected PDF, send the password through a different channel (e.g., text message or phone call).
Common mistakes
- Forgetting the password — there's no way to recover it.
- Using a weak or commonly used password that's easy to guess.
- Sharing the password in the same email as the protected PDF.
- Deleting the original file before testing the protected version.
- Protecting a PDF that's already encrypted without unlocking it first.
Troubleshooting
- The protected PDF won't open: Double-check that you're entering the correct password. Passwords are case-sensitive.
- Permissions aren't being enforced: Some PDF readers (especially older ones) may not respect permission settings. Try opening in a modern reader like Adobe Acrobat or Chrome.
- I forgot my password: PDFly cannot recover lost passwords. If you need the content, you'll need to find the original unprotected file.
- The file is very large after protection: Encryption adds minimal overhead — any size increase is usually negligible.