PDF Lock / Unlock
Protect a PDF with a password or remove its protection.
PDF Lock / Unlock adds or removes password protection on a PDF without installing utilities. Lock mode sets a required user password (and an optional owner password) plus printing, editing, and copy permissions using AES-256 encryption. Unlock mode accepts the current password, decrypts a preview in the browser, then writes an unprotected file you can download.
Encryption runs through qpdf compiled to WebAssembly in your page — first load may take a moment while the module warms up, then lock and unlock stay on-device. An Encrypted pill in the header tells you which mode applies to the file you loaded.
How it works
On load the tool detects encryption with PDF.js. Unencrypted files open on the Lock tab; encrypted files open with an amber notice and move you toward Unlock. Lock builds a qpdf command with your user and owner passwords and permission flags for print, modify, and extract; Unlock runs decrypt with the password you provide, updates the in-memory preview, then on Unlock & Download writes the cleared file.
The page grid only renders once the document is readable (plain file, or successfully unlocked preview). Wrong passwords and corrupt files surface as toasts rather than silent failures.
How to use
- Open Lock / Unlock PDF and add a document (hint: Choose a PDF to protect or unlock).
- Read the header — an Encrypted pill means you must unlock before locking again.
- To add protection: stay on Lock, enter User Password (required) and optionally Owner Password.
- Set Permissions checkboxes: Printing (high quality), Modifying content, Copying content.
- Click Lock & Download and wait for Locking… to finish.
- To remove protection: switch to Unlock, enter the password, click Unlock & Preview.
- Confirm the success banner and page preview, then Unlock & Download.
- Save Locked_PDF or Unlocked_PDF (rename if you like) and use Start Over to reset.
Tips
- User password opens the file; owner password controls permissions when both are set.
- Leave owner password empty to mirror the user password (the UI says so under the field).
- First lock/unlock can pause while the ~1.8MB qpdf WASM compiles — allow up to a minute.
- Always verify permissions after lock by reopening the file in a PDF reader.
PDF Lock / Unlock FAQ
Is the password sent to your servers?
No. qpdf runs as WebAssembly in your browser; the file and passwords stay on your device.
What encryption is used?
AES-256 via qpdf’s standard encrypt options, with separate user/owner credentials and permission bits.
Why is Lock disabled on an encrypted file?
You cannot re-lock until you unlock. Use the Unlock tab with the current password first.
Unlock failed — what now?
The password is likely wrong or the file is damaged. Re-check the password; corrupt files cannot be recovered here.
Can I change only permissions without a new password?
Not in this UI — enter the user password (and owner password if desired) when locking to set both credential and permissions together.