Skip to content
Devtools 360

Add a Password to a PDF

Encrypt a PDF so that it can only be opened with your password. You can also set an owner password and choose whether readers may print, copy or edit the document.

Runs in your browser (background worker)Free · No sign-up

How to password-protect a PDF

  1. Choose the PDF you want to protect.
  2. Enter the open password twice; the strength meter shows how hard it is to guess.
  3. Optionally set a different owner password and untick the actions readers should not be allowed to do.
  4. Select Protect PDF. The result is reopened automatically to verify the password works, then you can download it.

Supported formats

Input
PDF
Output
Encrypted PDF
Maximum size
200 MB per file (limited by your device's memory)

Open password vs owner password

The open (user) password is required to view the document and is what actually encrypts its contents. The owner password controls the permission flags — printing, copying, editing and commenting. Permissions are advisory: Acrobat, browsers and most readers honour them, but software that ignores the flags can still print or copy once the file is open. If you leave the owner password empty, the open password also grants owner access, so set a separate one when restrictions matter. To check the security settings of a PDF you received, open it in the PDF Metadata Viewer.

Benefits

  • Uses AES-256 (security handler revision 6), the only PDF encryption ISO 32000-2 still recommends.
  • The output is automatically reopened with PDF.js to confirm it needs the password and opens with yours.
  • Your password and document stay on your device — nothing is sent to a server.

Limitations

  • AES-256 PDFs need Acrobat Reader 9 / Acrobat X or newer; very old viewers cannot open them.
  • Permission restrictions are honoured by compliant viewers only and are not real access control.
  • PDFs that are already encrypted, and PDF/A files (which must not be encrypted), cannot be processed.

Privacy and security

Encryption is performed by pdf-lib (@cantoo fork) in a Web Worker in this tab, using the browser's secure random number generator. The password is held only in memory and is never stored or transmitted.

Read our privacy policy for details about the site as a whole.

Frequently asked questions

Which encryption does this tool use?

AES with 256-bit keys, written as a PDF 2.0 standard security handler (V5, R6). The library refuses weak RC4 encryption, so files are not compatible with readers from before 2008.

What if I forget the password?

There is no recovery. The password is not stored anywhere, and AES-256 cannot practically be broken. Keep a copy of the original or note the password safely.

Can I remove the password later?

Open the file in a PDF reader with the password and save or print it to a new, unprotected PDF. This tool only adds protection.