You're about to email a bank statement, a signed contract, or a scan of your ID β and you'd rather it not sit readable in someone's inbox forever if the message goes to the wrong person. A password on the PDF fixes that: without it, the file won't even open. The catch most guides miss is that a document worth locking is exactly the kind you shouldn't hand to a random "PDF password" website to do it. You don't have to β your own computer can encrypt it locally.
The fast answer: Mac encrypts PDFs out of the box (Preview β Export), and on Windows the free LibreOffice does it offline. Both lock the file on your machine, so the sensitive document never leaves it. Here's the how, plus what a PDF password does and doesn't protect.
First: don't upload the very file you're trying to protect
It sounds obvious, but the most common way people "password-protect" a PDF is to drag it into an online locker β which means uploading an unprotected copy of your private document to a stranger's server first. That's backwards. If the PDF is worth encrypting, encrypt it on your own device. Our guide on whether online PDF tools are safe explains how to tell an upload tool from an in-browser one, and free tools that don't upload your files lists the local kind for when you do need the web.
Mac (built in, no download)
macOS Preview can encrypt any PDF:
- Open the PDF in Preview.
- File β Export.
- Tick Encrypt, type a password (twice), and Save.
From now on the file asks for that password before it opens. That's it β nothing installed, nothing uploaded.
Windows (free, offline β LibreOffice)
Windows has no built-in PDF encryptor, but the free, open-source LibreOffice does it locally:
- Open the PDF (or the source document) in LibreOffice.
- File β Export As β Export as PDF.
- On the Security tab, click Set Passwords, enter an open password, and export.
LibreOffice is a one-time free download that runs entirely offline β a safe, permanent tool to keep for this. (If you have Adobe Acrobat Pro, File β Protect works too, but you don't need paid software.)
On your phone
- iPhone: open the PDF in the Files app, tap the share/more menu, and choose Lock PDF β set a password. iOS encrypts it in place.
- Android: most PDF reader apps (and some file managers) have an Encrypt / Set password option in the share or more menu; pick a strong password and save a new copy.
Choose a password that actually helps
- Make it strong and unique β a locked PDF is only as safe as the password. A short, reused one defeats the point.
- Send the password separately. Never put it in the same email as the file. Text it, say it on a call, or use a different channel.
- Keep an unlocked master copy somewhere safe. If you forget the password, a properly encrypted PDF is genuinely unrecoverable β that's the feature working.
What a PDF password does and doesn't do
A PDF open password encrypts the file: no password, no reading it β solid protection in transit and at rest. What it is not is a substitute for the recipient handling it responsibly once they've opened it. And "permissions" passwords (which try to block printing or copying while still letting the file open) are weak and easily stripped β rely on the open password, not permissions, for anything that matters.
Mistakes to avoid
- Uploading the unprotected PDF to lock it. Encrypt locally; don't hand the plaintext to a website first.
- Emailing the password with the file. That's like taping the key to the door β send it by another channel.
- Trusting a "permissions" password to keep secrets. Only the open (encryption) password truly protects the contents.
- Not keeping a backup. Forget the password on a strongly encrypted file and it's gone for good.
Frequently asked questions
How do I password-protect a PDF for free? On Mac, open it in Preview and use File β Export β Encrypt. On Windows, use the free LibreOffice: File β Export As PDF β Security β Set Passwords. Both work offline without uploading the file.
Can I add a password to a PDF without software? On Mac and on phones, yes β it's built in (Preview on Mac, Lock PDF on iPhone). On Windows you'll need a free tool like LibreOffice, since there's no built-in PDF encryptor.
Is it safe to password-protect a PDF online? It's risky: most online lockers require you to upload the unprotected file first. For anything private, encrypt on your own device instead β see are online PDF tools safe.
What if I forget the PDF password? A properly encrypted PDF can't be opened without it β by design. Always keep an unlocked master copy in a safe place before you share the locked one.
The bottom line
Locking a PDF is a local job: Preview β Export β Encrypt on Mac, LibreOffice β Export as PDF β Security on Windows, or Lock PDF on your phone. Pick a strong, unique password, send it through a separate channel, and keep an unlocked backup. The sensitive file gets real encryption without ever leaving your device β which is the whole point of protecting it.



