A bank statement or payslip that asks for a password every single time you open it gets old fast. If it’s your document and you know the password, you can save a copy that opens normally. The catch with the obvious fix — an online “unlock PDF” site — is that you’d be typing the document’s password into a stranger’s web form along with the file itself. For financial or personal PDFs, that’s exactly backwards.
WSL does it locally with qpdf: supply the password you already have, get a decrypted copy, and nothing leaves your machine.
If WSL isn’t installed, start with the WSL install guide.
Install qpdf
sudo apt update && sudo apt install -y qpdf
Confirm:
qpdf --version
Remove the password
The --decrypt option writes a copy with the encryption removed. Supply the password with --password:
qpdf --decrypt --password=YOURPASSWORD locked.pdf unlocked.pdf
locked.pdf stays as-is; unlocked.pdf opens without a prompt. That’s the whole job.
If the password has special characters or spaces, quote it:
qpdf --decrypt --password='p@ss word!' locked.pdf unlocked.pdf
User password vs owner password
PDFs can carry two kinds of password:
- User (open) password — needed just to view the file.
- Owner (permissions) password — controls printing, copying, and editing, even if the file opens freely.
qpdf --decrypt with the correct password produces a fully unrestricted copy. If a PDF opens without prompting but won’t let you print or copy, it has an owner password; supply that one to --password to lift the restrictions on your own document.
qpdf decryption commands
| qpdf --decrypt --password=PW in.pdf out.pdf | Remove password, save decrypted copy |
|---|---|
| qpdf --show-encryption in.pdf | Show how the file is encrypted |
| qpdf --decrypt --password='a b!' in out | Quote passwords with spaces/symbols |
To see what protection a file has before you start:
qpdf --show-encryption locked.pdf
Decrypt several files with one password
If you have a batch of statements that share the same password, loop over them into a separate folder:
mkdir -p unlocked
for f in *.pdf; do qpdf --decrypt --password=YOURPASSWORD "$f" "unlocked/$f"; done
Decrypted copies land in unlocked/; the originals stay encrypted and untouched.
Wrapping up
Removing a password from a PDF you own is one command: qpdf --decrypt --password=YOURPASSWORD locked.pdf unlocked.pdf. It works for both user and owner passwords, doesn’t change the content, and runs entirely in WSL — so you never type a document’s password into a website.
qpdf is the same tool behind merging and splitting PDFs, so once it’s installed it covers a lot of everyday PDF work locally and for free.