How-to
How to Password-Protect a PDF on Mac, Windows and Linux (Free)
Pick the method that matches your computer, set an open password, and share that password through a different channel than the file.
Researched from official sources · How we verify · Sources

On this page
To password-protect a PDF for free, use Preview on a Mac (File > Export > Permissions), LibreOffice on any computer (File > Export As > Export as PDF > Security), or qpdf from the command line. Set an open password if you want to stop people reading the file. A permissions password on its own does not do that.
Scope: free, offline methods only. All steps in this guide come from documentation (Apple’s Preview guide, LibreOffice Help and the qpdf manual, read November 23, 2026); we have not yet run them on our own test machine.
Open password vs permissions password
Most PDF tools offer two passwords, and they do very different jobs:
| Open password (user password) | Permissions password (owner password) | |
|---|---|---|
| What it stops | Opening and reading the file | Printing, editing or copying, if the reader app respects it |
| Needed to view the file? | Yes | No |
| How strong | Encrypts the content; a long password is hard to break | Easy to bypass with many tools |
If the PDF holds anything private, set an open password. Add a permissions password on top only if you also want to discourage printing or editing.
Method 1: Preview on a Mac
Preview is built into macOS. Per Apple’s Preview guide:
- Open the PDF in Preview.
- Choose File > Export. To keep the original unprotected, give the copy a new name.
- Click Permissions.
- Select Require Password To Open Document, then type and retype the open password.
- Optionally, choose what people may do without the owner password (printing, changes).
- Enter an Owner Password and retype it.
- Click Apply, then Save.
To change the password on a PDF you already protected, open it and choose File > Edit Permissions, make your changes and click Apply.
Method 2: LibreOffice on Windows, Mac or Linux
LibreOffice is free and adds passwords when it exports a PDF. This works best for documents you write in LibreOffice Writer, or a Word file you open in it. Following LibreOffice Help:
- Open the document in LibreOffice.
- Choose File > Export As > Export as PDF.
- Go to the Security tab and click Set passwords.
- Enter a password to open the document. Optionally enter a second password that lets the holder print or edit.
- Under Printing, Changes and Contents, choose what is allowed without the second password.
- Click OK, then Export, and choose where to save the file.
LibreOffice Help notes that the printing and editing restrictions are only honored by PDF readers that follow the PDF 1.5 rules, so older or non-compliant readers may ignore them. The open password still applies.
To protect an existing PDF without re-creating it, Preview (Mac) or qpdf (any system) is the better choice. Opening a PDF in LibreOffice Draw and exporting it again can change fonts and layout.
Method 3: qpdf on the command line
qpdf is a free, open-source tool for Windows, Mac and Linux. It encrypts an existing PDF without changing how it looks. Install it from your package manager (for example brew install qpdf on a Mac or sudo apt install qpdf on Debian and Ubuntu), then run:
qpdf --encrypt "open-password" "owner-password" 256 -- input.pdf protected.pdf
- The first value is the open password, the second is the owner password, and
256selects 256-bit encryption, which the qpdf manual recommends. - Use a different owner password from the open password. With 256-bit encryption, qpdf refuses an empty owner password unless you add
--allow-insecure. - The original
input.pdfis not changed; the protected copy isprotected.pdf.
To make an unprotected copy later (you need the password):
qpdf --decrypt --password="open-password" protected.pdf unlocked.pdf
Check that it worked
Open the new file. Your PDF reader should ask for the password before it shows anything. If it opens straight away, you only set a permissions password; go back and add an open password.
Tips for sharing a protected PDF
- Send the password separately. Put the file in an email and the password in a text message or a call, not in the same message.
- Use a long password. A short or common password can be guessed, even with strong encryption.
- Keep an unprotected original somewhere safe, or store the password in a password manager. There is no “forgot password” option for a PDF.
- Clean the file first. A password does not remove hidden data. Remove metadata from the PDF and redact sensitive text properly before you protect it.
- Too big to email? Compress the PDF before adding the password.
Sources
- Apple Support, Password-protect a PDF in Preview on Mac (read 2026-11-23)
- LibreOffice Help, PDF Export Security (read 2026-11-23)
- LibreOffice Help, Export as PDF (read 2026-11-23)
- qpdf manual, Running qpdf (read 2026-11-23)
Short answers
What is the difference between an open password and a permissions password?
An open password (user password) is needed to view the PDF at all. A permissions password (owner password) only controls printing, editing and copying. Without an open password, anyone can read the file, and some PDF tools ignore the permission flags.
Can I password-protect a PDF without Adobe Acrobat?
Yes. Preview on a Mac, LibreOffice on Windows, Mac or Linux, and the free qpdf command-line tool can all add an open password to a PDF.
What if I forget the PDF password?
There is no reset link. With strong encryption, a forgotten open password usually means the file is lost, so keep an unprotected original in a safe place or store the password in a password manager.
Is it safe to use an online PDF password tool?
It means uploading the unprotected file to someone else's server first. For contracts, IDs, medical or financial documents, use one of the offline methods in this guide instead.







