Micro Tool Yard logo

Drag & drop a PDF here

Add a password to protect it — nothing leaves your device.

Ad Slot

How it works

  1. Drop your PDF

    Drag a file in or choose one from your device — nothing is uploaded.

  2. Set a password

    Enter and confirm the password that will be required to open this PDF.

  3. Choose an encryption strength

    AES-256 by default, or RC4 compatibility mode for older PDF readers.

  4. Protect and download

    Get a new PDF that requires your password to open.

Add Password to PDF adds real password encryption to a document, requiring that password to open it in any PDF reader from then on. Unlike the other tools on this site, this one can't rely on pdf-lib alone — encrypting a PDF correctly means implementing the PDF specification's actual encryption algorithms, which is a job better left to battle-tested, purpose-built software. So this tool runs qpdf, a long-established open-source PDF encryption and manipulation tool, compiled to WebAssembly and loaded directly in your browser the first time you visit this page.

That WebAssembly module is fetched once, cached by your browser like any other asset, and never touches a server again on repeat visits. Your PDF and the password you choose are handed to it entirely in your browser's memory — nothing about either one is ever transmitted anywhere.

AES-256 is the recommended, modern encryption standard and is selected by default. RC4 is offered as a "compatibility mode" for the increasingly rare case where you need the protected file to open in very old PDF software that predates AES support — it's meaningfully weaker and shouldn't be your first choice unless you have a specific compatibility reason to use it.

We deliberately didn't use MuPDF for this feature, despite it being a common choice elsewhere, because its license (AGPL-3.0) doesn't fit a site built entirely on permissively-licensed, freely redistributable components. qpdf is Apache-2.0 licensed, which is why it was chosen instead.


FAQ

Is my PDF or password uploaded anywhere?
No. Add Password to PDF runs entirely in your browser using a WebAssembly build of qpdf, a well-established open-source PDF encryption tool. Your file and password are processed locally — neither is ever sent over the network.
What's the difference between AES-256 and RC4?
AES-256 is a modern, strong encryption standard and the recommended default for protecting sensitive documents. RC4 is an older, weaker algorithm kept here only as a "compatibility mode" for the rare case where you need to open the protected file in a very old PDF reader that doesn't support AES.
Will I be able to remove the password later?
Yes, as long as you remember the password you set — use this site's Remove Password from PDF tool with the same password to produce an unprotected copy again.
What happens if I forget the password?
There is no recovery option — that's the whole point of encryption. If you forget the password, the protected PDF cannot be opened or unlocked by this tool or by us, since we never see your password or file in the first place.
Is there a file size limit?
Files under 100MB process without any warning. Larger files up to 400MB will process but may take longer; files above 400MB are rejected up front with a clear message.