ALL PDF TOOLS37
Protect PDF
Password Protect a PDF — Free Online Tool
Encrypt a PDF with a password you choose — AES-256 by default, and neither the file nor the password leaves your browser.
About Protect PDF
A contract going out by email, a payslip, a scan of a passport — some documents should not open for whoever the message gets forwarded to. This page writes a password into the PDF itself using qpdf, the Apache-2.0 command-line PDF tool, compiled to WebAssembly and run inside your tab. Type a password, confirm it, and the document is encrypted with AES-256. AES-128 is offered for readers old enough not to understand the newer scheme, and RC4 — which the format still permits and which is broken — is never offered at all. Two passwords exist in a PDF and the difference matters. The user password is the one a reader is prompted for; the owner password is the one that lets a tool change the security settings afterwards. qpdf refuses to write a 256-bit file that has a user password and no owner password, so unless you set a separate owner password the tool uses the one you typed for both. That is the honest default: it is what most people mean, and it is what happens elsewhere without being said out loud. Now the limits, because they are the whole reason to read this. A password stops someone opening the file. It does not stop the person you gave the password to from opening it and saving a copy with the password taken off — this site has a page that does exactly that. It does not stop a screenshot, a photograph of the screen, or a forwarded printout. Restrictions on printing and copying can be written in alongside the password, but those are advisory flags a reader may honour or ignore, and PDF Permissions is the page that explains what they really are. There is no reset here. If you lose the password the document is gone, which is what encryption means and why nothing on this site can help you afterwards. A password longer than 127 bytes is refused before anything is written, because qpdf would accept it, encrypt with it, and then never let it back in. And a file that already carries a password has to be unlocked first — qpdf will not re-encrypt one, so the tool checks before it runs rather than failing halfway. Nothing is uploaded: the document and the password both stay in your tab.
Questions
What is the difference between a user password and an owner password?
The user password is the one a reader is asked for when the document opens. The owner password is the one that lets a tool change the security settings afterwards — including taking the protection off. qpdf will not write a 256-bit file that has a user password and no owner password at all, so unless you set a separate owner password the tool uses the password you typed for both. That is almost always what people mean, and it is stated here rather than done silently.
Should I choose AES-256 or AES-128?
AES-256 unless something forces your hand. It is the default here and it is what current readers expect. AES-128 exists for readers old enough not to understand the newer scheme — think a viewer that predates Acrobat X. The format also permits RC4, which is broken, and this tool will not write it at any setting.
Is there a limit on how long the password can be?
Yes — 127 bytes of UTF-8, and the limit is bytes rather than characters, so an accented or CJK password reaches it sooner than an ASCII one. Anything longer is refused before the document is touched. That refusal is deliberate and it is the most important thing on this page: qpdf will happily encrypt with a longer password, report success, print no warning at all, and then never accept that password back — not the original, not any truncation of it. The file would be permanently unopenable and nothing would have told you.
Can I add a password to a PDF that is already protected?
No. qpdf refuses to encrypt a document it cannot open, and it reports that as an invalid password rather than as a file it declines to touch. The tool checks the document before it runs and tells you plainly, instead of failing halfway through. Take the existing password off with Unlock PDF first, then protect the result.
What happens if I lose the password?
The document is gone. There is no reset, no master key and no recovery — that is what encryption is for, and it is exactly why nothing on this site can open a file whose password you do not know. Keep the password somewhere before you close the tab. And be clear about the other direction too: anyone you give the password to can open the file and save a copy with the password removed.
Is my file uploaded to a server?
No. Transmute processes everything locally in your browser using JavaScript and WebAssembly. Your files never leave your device — there is no server, no upload, no cloud processing.