How-To

How to Password Protect a PDF for Free

· 5 min read

Quick summary: To password protect a PDF for free, use Preview on Mac (File → Export as PDF → check Encrypt), LibreOffice on Windows (File → Export as PDF → Security tab), or Ghostscript on the command line. PDFs support two password types: an open password (blocks viewing) and a permissions password (blocks editing and printing).

Adding a password to a PDF before sharing it ensures only the intended recipient can open or modify it. Every major platform can do this for free — no Adobe Acrobat Pro subscription needed. Once you have finished editing and protecting your file, you can use our free PDF reader online to review the final version before sending.

Two types of PDF password protection

PDFs support two separate password layers — you can apply either or both:

TypeWhat it doesWhen to use
Open password (user password)Recipient must enter it to open the fileSensitive documents, NDAs, medical records
Permissions password (owner password)File opens freely, but editing, printing, or copying is blockedForms you send out, reports you don’t want modified

The methods below show how to add both types.

How to password protect a PDF on Mac — Preview

Preview can add an open password in seconds:

  1. Open the PDF in Preview.
  2. Go to File → Export as PDF.
  3. In the save dialog, check “Encrypt”.
  4. Enter a password in the Password and Verify fields.
  5. Click Save.

Anyone who opens the saved file will be prompted to enter the password.

Limitation: Preview only supports open passwords. To add a permissions password (restrict editing/printing), use the command-line method below or a PDF library like LibreOffice.

How to password protect a PDF on Windows

Windows has no built-in PDF password tool, but two free options cover most needs:

Option A: LibreOffice (free, no watermark)

  1. Download and install LibreOffice (free, open-source).
  2. Open the PDF in LibreOffice Draw (right-click → Open with → LibreOffice Draw).
  3. Go to File → Export as PDF.
  4. In the PDF options dialog, click the Security tab.
  5. Set an Open password and/or a Permissions password.
  6. Choose which actions to restrict (printing, copying, editing).
  7. Click Export and save.

Option B: Microsoft Word (if you have Office)

  1. Open the PDF in Word (it converts automatically).
  2. Go to File → Info → Protect Document → Encrypt with Password.
  3. Enter a password and click OK.
  4. Save the file as PDF via File → Save As → PDF.

How to password protect a PDF on iPhone

iOS does not have a native PDF password tool, but you can use the Shortcuts app:

  1. Open the Shortcuts app and create a new shortcut.
  2. Add the action “Protect PDF” (available from iOS 15+).
  3. Set a password, then run the shortcut on your PDF file.
  4. The protected PDF saves to Files.

Alternatively, open the Files app, select the PDF, share it to an app that supports PDF encryption (some third-party apps on the App Store offer this).

How to add a password to a PDF online — free

Search for “password protect PDF free” and choose any well-reviewed browser tool:

  1. Upload your PDF.
  2. Enter the password you want to set.
  3. Download the protected file.

Privacy note: Your file is uploaded to a remote server. Never use online tools to protect documents that are already sensitive — encrypt them locally using Preview, LibreOffice, or Ghostscript instead.

How to password protect a PDF with Ghostscript (command line)

For scripting or batch processing, Ghostscript sets both password types:

gs -sDEVICE=pdfwrite -dNOPAUSE -dBATCH \
   -sOwnerPassword=yourOwnerPass \
   -sUserPassword=yourUserPass \
   -dEncryptionR=3 -dKeyLength=128 \
   -sOutputFile=protected.pdf input.pdf

Omit -sUserPassword if you only want a permissions lock without an open password.

How strong is PDF password protection?

PDF encryption has improved significantly since PDF 1.6. Modern PDFs use AES-256 encryption, which is strong enough for most business purposes. Older PDFs may use 40-bit or 128-bit RC4 — still sufficient for casual protection, but not for highly classified content.

PDF versionEncryptionStrength
PDF 1.3 and earlier40-bit RC4Weak — avoid
PDF 1.4–1.5128-bit RC4Moderate
PDF 1.6–1.7128-bit AESGood
PDF 2.0256-bit AESStrong

When in doubt, re-export the file from a modern tool to ensure AES-256 is used.

Common questions

Can I password protect a PDF without Adobe Acrobat?

Yes — Preview on Mac, LibreOffice on Windows, and Ghostscript on any platform all add PDF passwords for free. See the methods above.

What happens if I forget the PDF password?

There is no official recovery option. Keep the password in a password manager before sending. If you lose access to your own document, no free tool can recover it legally — brute-force attempts can take days or years depending on password strength.

Does password protection work on all PDF viewers?

Open passwords are universally respected — any compliant PDF viewer will ask for the password. Permissions passwords are enforced by Adobe Acrobat and most major viewers, but some third-party apps ignore them intentionally.

How do I protect a PDF from being printed?

Use a permissions password with printing disabled (see the LibreOffice or Ghostscript method above). Note that this is advisory rather than absolute — technically sophisticated users can work around permissions locks. For truly sensitive content, consider a DRM solution instead.

Upload your PDF and let AI read it

Get an instant summary, ask questions about the content, or translate into another language — all free, no sign-up.

Try the AI PDF Reader