Protect a PDF with a password
Add a password to a PDF, or replace the password it already has, without the file ever leaving your device. The encryption is done by qpdf compiled to WebAssembly running inside this page, so a confidential contract or payslip stays on your machine. Changing a password happens in a single pass — the old one decrypts and the new one re-encrypts together — so a decrypted copy is never written anywhere.
Drop a PDF here
or
Your file is opened in this page only — it is never uploaded.
Your PDF is protected
DownloadThere is no way to recover a PDF password — not here, and not anywhere. Write the password down somewhere safe before you close this page.
Add a password to a PDF
Drop the file in, type a password twice, and press Protect PDF. The result is encrypted with AES-256, the same algorithm banks and governments use, and the password is required before a reader will display a single page. This is real encryption rather than a flag a reader may choose to honour: without the password the contents are mathematically unavailable, not merely hidden.
Because the whole job happens inside this page, the file you are protecting is usually the one you least want to hand to a stranger — a contract, a payslip, a medical letter. It stays on your machine.
Change a PDF's existing password
Drop in a PDF that already has a password and this page notices, then asks for the current one alongside the new one. You need the existing password: that is the point of encryption, and no tool can get around it.
The swap happens in a single operation. The old password decrypts the document and the new one re-encrypts it in the same pass, so a decrypted copy is never written down anywhere, not even briefly in memory as a separate file. That matters when you are rotating a password precisely because you think the old one has leaked.
Why there is no "block printing" option
PDF has a second kind of protection: permission flags that say a document may not be printed, copied or edited. Plenty of tools offer them. This one does not, and the reason is that they mostly do not work.
The flags are advisory. Each reader decides whether to honour them, and the readers most people actually use do not. Open a print-restricted PDF in Chrome, Edge or Safari and it will print. Open it in macOS Preview and you can select and copy the text. Since most PDFs today are opened in whatever browser the link was clicked in, a restriction fails far more often than it holds. Anyone with the password can also strip the flags in seconds with any PDF tool, including the unlock tool on this site.
Offering that as a feature would mean handing you a document you believe is protected when it is not, which is worse than being told plainly that it cannot be done. Encryption is different: the password is enforced by mathematics rather than by a reader's goodwill, so it holds everywhere. If a document must not be printed or copied, do not give the file to the person — send them a link you can revoke, or a flattened image, and accept that anything they can read they can photograph.
Choosing a password you will not lose
Length beats complexity. Four unrelated words are easier to remember and harder to guess than a short jumble of symbols, and the meter above is deliberately conservative about anything short or numeric. PDF encryption uses at most the first 127 bytes of what you type, so this page stops you before a longer passphrase silently produces a file that cannot be opened again.
Non-English characters, spaces, emoji and punctuation are all fine with AES-256. Store the password in a password manager rather than in the same folder as the PDF, and remember there is no reset link. If it is lost, the document is gone.
Why the file never leaves your device
The encryption is done by qpdf, a long-standing open-source PDF tool compiled to WebAssembly and running inside this tab. Your PDF is read into the page's own memory, encrypted there, and handed back as a download. Once the engine has loaded, the tool keeps working with the network switched off entirely — which you are welcome to test, and is the clearest demonstration that nothing is being sent anywhere.
Frequently asked questions
How do I password protect a PDF?
Drop the PDF into the tool above, type a password twice, and press Protect PDF. The file is encrypted with AES-256 inside your browser and downloaded straight back to you. Nothing is uploaded, so the document never touches a server.
How do I change the password on a PDF?
Drop in a PDF that already has a password. The tool detects it and asks for the current password as well as the new one. The old password decrypts and the new one re-encrypts in a single pass, so no decrypted copy of the document is ever created.
Can I protect a PDF without knowing its current password?
No. If a PDF is already encrypted, its existing password is required before anything can be changed. That is what encryption means, and no tool can work around it — anything claiming otherwise is either guessing common passwords or not doing what it says.
What happens if I forget the password I set?
The document becomes unreadable, permanently. There is no recovery, no reset link and no back door, here or anywhere else. Write the password down or store it in a password manager before you close the page.
Can I stop someone printing or copying my PDF?
Not reliably, and this tool does not pretend to. PDF permission flags are advisory: Chrome, Edge, Safari and macOS Preview all ignore them, and anyone with the password can strip them with any PDF tool. Since most PDFs are opened in a browser, a print restriction fails more often than it works. A password is enforced by encryption rather than by a reader's goodwill, so that is what this tool offers.
Is AES-256 encryption on a PDF actually secure?
Yes. AES-256 is the current standard and there is no practical attack against it; the weak point is always the password rather than the algorithm. Avoid short or obvious passwords, and prefer a long passphrase. AES-128 is offered only for readers too old to support AES-256.
Does the PDF get uploaded to a server?
No. The encryption runs in your browser through qpdf compiled to WebAssembly, and your file is only ever held in this page's memory. Once the engine has loaded you can disconnect from the internet entirely and the tool still works.