How to Password Protect a PDF
Published
A PDF password can do two very different jobs: lock the file so it cannot be opened, or ask PDF programs not to allow printing or copying. This guide explains which of the two actually protects your content, how strong PDF encryption is, and how to choose, share and later remove a password.
Two kinds of PDF password
The PDF format defines two passwords. The open password (the standard calls it the user password) is needed to open the file at all. Without it the contents are encrypted bytes: the text, images and document properties cannot be read.
The permissions password (the owner password) controls flags that tell PDF programs whether to allow printing, copying text, editing and similar actions. When a file has only a permissions password, it opens for anyone, which means every PDF program can decrypt it. Whether printing or copying is then blocked depends entirely on the program honouring the flags, and nothing in the file can force it to.
So the open password is what protects the content. Permission restrictions are a request: they discourage casual copying but do not stop anyone determined.
How strong is PDF encryption?
PDF password encryption has used four main methods over the years, and you can still receive files that use any of them. With either AES method the cipher is not the weak point; the password is. Anyone with a copy of the file can try passwords on their own computer, as fast as it allows, with no lockout and no record of the attempts. A short or guessable password can be found that way, however strong the encryption.
- 40-bit RC4, used by the first versions of PDF encryption. The key is short enough to be found by trying every possible key, whatever the password. Treat it as no protection.
- 128-bit RC4, added in PDF 1.4. The key is long enough, but RC4 itself has known weaknesses and has been withdrawn from other uses such as web (TLS) encryption. It is obsolete.
- 128-bit AES, added in PDF 1.6. Current, with no known practical attack on the cipher.
- 256-bit AES, the newest method, standardised in PDF 2.0. Also current.
Adding a password with FlexyPdf
In the PDF Password tool, choose Protect PDF, add your file, type the password in Password and Confirm Password, and click Protect PDF. The download ends in -protected.pdf. The tool uses 128-bit AES (revision 4 of the PDF standard security handler), and every text string and data stream in the file is encrypted with a key derived from your password.
It sets an open password only. Printing, copying and editing are left allowed for anyone who opens the file, because restrictions would only be flags that some programs ignore. Passwords must be 4 to 32 characters of English letters, digits, spaces and standard keyboard symbols. This encryption method only uses the first 32 characters of a password, and PDF readers handle accented and non-Latin characters differently, which could lock you out of your own file.
A file that is already encrypted, even one that only has printing or copying restrictions, is refused: remove the existing protection with Unlock PDF first, then add the new password. Other FlexyPdf PDF tools, such as Compress PDF and PDF Merger, cannot read protected files, so compress, merge or split first and add the password last.
Choosing a strong password
Because guessing happens offline, length and randomness matter more than anything else. Avoid anything another person could know or find out: dates of birth, phone numbers, vehicle, PAN or account numbers, names, and common words with a digit added. Those are exactly what a guesser tries first.
The simplest strong option is a random password. The Password Generator creates one with your browser’s cryptographic random number generator and shows its estimated strength in bits. Its default, 16 characters mixing upper and lower case letters, digits and symbols, fits the PDF tool. Keep the length at 32 characters or fewer, because that is the most the PDF tool’s password box accepts.
If the recipient will type the password on a phone, turning symbols off makes it easier to enter; add a few characters to make up for it. Exclude Ambiguous leaves out characters such as 0, O, l and 1 that are easy to misread when a password is read aloud or copied by hand.
Store the password somewhere safe, such as a password manager. The tool cannot recover a forgotten open password, and nobody else can either except by guessing, so if you may need the document again, keep the unprotected original somewhere secure as well.
Removing a password from your own file
If you know the password, Unlock PDF in the same tool saves an ordinary, unencrypted copy whose name ends in -unlocked.pdf. It handles all four methods above: 40-bit and 128-bit RC4, 128-bit AES and 256-bit AES. You can enter either the open password or the permissions password, and the copy comes out without any printing or copying restrictions. If the file opens without a password but has restrictions, leave the Password box empty.
Unlock does not guess or crack passwords. A wrong password gets an “Incorrect password” message, and files protected with a certificate instead of a password cannot be unlocked with this tool. Only remove protection from files you own or are allowed to change, and keep in mind that re-saving a PDF invalidates any digital signature in it.
A common case is a statement that arrives protected with a password built from personal details. Unlock it once, keep the original, and the copy can then be merged, split or compressed like any other PDF. Protect the result again before sending it on if it still needs protection.
What password protection does not do
Password protection controls who can open the file. Once someone has the password, it does nothing more:
- It doesn’t stop copying, printing, screenshots or forwarding. Anyone with the password can do all of these, and can save an unprotected copy.
- It can’t be withdrawn. A file you have sent stays readable with the password it was sent with; changing the password on your copy does not affect theirs.
- It doesn’t hide everything. The structure of the file, such as the number of pages, is not encrypted, and neither is the file name.
- It doesn’t prove who made the file or that nobody has changed it. That is the job of digital signatures, a separate feature.
- Permission-only restrictions, without an open password, don’t protect the content at all.
Questions
Is a password-protected PDF safe to send by email?
With an open password and AES encryption, the contents cannot be read without the password, so the protection is as good as the password and the way you share it. Use a long random password and send it separately from the file. If your workplace or the recipient requires a particular secure transfer method, follow that instead.
Can I stop people printing or copying without needing a password to open the file?
Not with this tool, which sets only an open password. Other programs can add permission restrictions, but those work only in readers that choose to honour them, so treat them as a deterrent rather than protection.
Is 256-bit AES much safer than 128-bit AES for a PDF?
Both are current and no practical attack on either cipher is known, so in practice the password decides how safe the file is. AES-256 is the newer method. AES-128, which this tool uses, has the advantage of also opening in older PDF readers that predate AES-256.
How do I change the password on a protected PDF?
In two steps: open it with Unlock PDF using the current password, then protect the unlocked copy with the new password using Protect PDF. Copies you have already sent keep the old password.
Tools used in this guide
This guide was drafted with the help of AI writing tools and checked against how the linked FlexyPdf tools actually work. It is general information, not professional advice. Found a mistake? Let us know.