What This Tool Does
A PDF password protector encrypts a PDF so that only people with the password can open it —
and, optionally, so that even people who can open it are blocked from printing,
copying, or editing. This page does both jobs entirely in your browser using the open-source
@cantoo/pdf-lib library: each file you drop is loaded into memory, encrypted with
AES-256 under the password you choose, and handed back as a download. There is no server, no
upload, and no account. Drop several PDFs at once and each one gets its own protected copy
under the same password. It is the mirror image of this site's
PDF
Password Remover, and it pairs naturally with the
PDF
Merger: merge first, then protect the combined file once.
The Two Passwords a PDF Can Carry
PDF encryption, defined by the standard security handler of ISO 32000 (the international PDF standard), knows two passwords, and the widget above maps onto them directly. The open password (or user password) is the one people usually mean by "password-protect a PDF": without it, a viewer cannot decrypt a single page. The permissions password (or owner password) is the master key — opening with it grants full access and the ability to change restrictions, while opening with the user password grants only what the permission flags allow.
One combination deserves special attention: a PDF with an owner password but an empty open password. That file opens and reads on any device without ever prompting, yet carries restriction flags that well-behaved viewers enforce — the classic "you can read this bank statement but you can't print it" setup. To make one here, leave the open-password field empty, set an owner password, and uncheck what you want to block.
| Open (user) password | Owner (permissions) password | |
|---|---|---|
| What it controls | Whether the file can be opened at all | Full access — and changing the restrictions |
| What you type above | The main password field | The optional field inside Restrictions |
| Left empty | File opens freely (restrictions-only mode) | The open password doubles as the owner password |
| Typical use | Confidential documents only certain people may read | Published forms and statements with "view but don't reuse" rules |
What the Restrictions Actually Enforce
The restriction checkboxes map onto the permission flags (the /P entry) of the
encryption dictionary. Two capabilities are deliberately never blocked by this tool: screen-reader
extraction (contentAccessibility) and filling in existing form fields — both stay
allowed even under full restriction, matching what Acrobat permits by default, because blocking
assistive technology and form use is almost never what anyone intends. "Editing" covers
everything that amounts to editing: content changes, comments and annotations, and rearranging
or deleting pages.
| Checkbox | Blocks when unchecked | PDF permission flag |
|---|---|---|
| Allow printing | Printing (high- and low-resolution) | bits 3 and 12 |
| Allow copying text and images | Copy/paste and content extraction | bit 5 |
| Allow editing | Content changes, annotations, page assembly | bits 4, 6, and 11 |
| Always allowed | Screen-reader access, filling existing forms | bits 9 and 10 |
An honest caveat belongs here: restriction flags are enforced by the viewer, not by physics. When a PDF has an open password, the content is genuinely unreadable without it — the encryption is real. But in restrictions-only mode (empty open password), the content is decryptable by any tool that cares to, because the standard security handler derives its key from the empty string in that mode. Compliant software respects the flags; non-compliant software can ignore them. If the content must stay secret, use an open password; if you just want honest readers funneled toward reading rather than reusing, restrictions are a reasonable, lightweight ask.
Why AES-256 Only
The ISO 32000-2 standard (PDF 2.0) permits only one encryption family for new documents: AES-256 with the revision-6 security handler, whose key derivation stretches each password through thousands of SHA-512 rounds precisely so that guessing is slow. This tool uses exactly that and nothing older. History's earlier handlers — RC4 40-bit from 1996, RC4 128-bit, AES-128 from 2004, and the deprecated R5 AES-256 variant from 2008 — remain readable for compatibility, and this site's PDF Password Remover can decrypt files encrypted with any of them, but producing new documents with broken ciphers would be a disservice. Every viewer released since roughly 2009 opens AES-256 documents; if yours does not, the fix is updating the viewer, not weakening the file.
Step-by-Step
- Add PDFs: drag one or more
.pdffiles onto the drop zone, or click it (or Browse) to open the file picker. Non-PDF files are rejected with a message. - Set the open password: type the password readers must enter. Use the eye button to confirm it before encrypting — a typo you don't notice is a file you can't open.
- Choose restrictions (optional): uncheck printing, copying, or editing to block them. Set an owner password if you want a master key separate from the open password — required if you left the open password empty for restrictions-only protection.
- Protect: click Protect PDFs. Each file is encrypted in turn; the status line summarizes how many succeeded, were skipped (already protected), or failed.
- Download: click Download on each result row — files are named after the original
with
-protectedappended, e.g.report-protected.pdf. - Start over: remove individual files with their remove buttons, clear everything at once, or drop new files. Results reset whenever any input changes.
Tips
- Long, random passwords matter more than any setting on this page — AES-256's weak point is
a guessable password, not the cipher. A four-word passphrase beats
P@ssw0rd!every time. - Passwords are case-sensitive and can be up to 127 bytes long; accents and non-Latin alphabets are fine (revision 6 normalizes them per the standard).
- Protecting a merged document? Combine the files first with the PDF Merger, then protect the single output — one password for one file beats five passwords for five files in an email thread.
- Already-protected files are skipped, not double-encrypted. To change a password, remove it with the PDF Password Remover first, then protect the unlocked copy with the new password.
- There is no password recovery — not here, not anywhere honest. Save the password in a password manager at the moment you create the file.
- Keyboard accessible: the drop zone responds to Enter/Space, and every control is labeled for screen readers.
Troubleshooting
“Enter a password to open the PDF — or set an owner password…”
Both password fields were empty. Encryption needs at least one password to derive its key from. Type an open password, or — for restrictions-only protection — set an owner password and leave the open password empty.
A file was “skipped — already password-protected”
That input file carries an /Encrypt dictionary already, and encrypting an
encrypted file would double-wrap it under two passwords. Decrypt it first: run it through the
PDF
Password Remover
with its current password, then protect the unlocked copy here.
“This file is not a valid PDF or is corrupted.”
The bytes are not a parseable PDF — a truncated download, a renamed file, or a public-key (certificate) encrypted document, which this tool does not handle. Try opening it in a desktop viewer first; if it will not open there either, re-download or re-export the original.
“This PDF/A archive document forbids encryption…”
The file is a PDF/A — the archival profile of PDF, used for long-term preservation — and the standard explicitly forbids encrypting PDF/A documents. Re-export or print-to-PDF a regular copy (every PDF/A producer offers this), then protect that copy. Archival originals should stay unencrypted; that is the point of the format.
A viewer says the protected file is unsupported
The file is AES-256 (revision 6), supported by every viewer since about 2009. A viewer that rejects it is older than that or badly out of date — update the viewer, and do not re-export the document to an older, weaker encryption to accommodate it.
I forgot the password I just set
The protected copy cannot be opened without it, and nothing on this site will guess it for you — by design. Restore from the original unprotected file (which you still have — this tool never modifies its input, it only creates new downloads) and protect it again with a password you store properly this time.