No upload, 100% local, no account

Password-protect PDF

Set a password on your PDF to prevent unauthorized access. Encryption runs in your browser, nothing is sent to a server.

How Password-protect PDF works

PDF Password Protection encrypts your PDF with a password using AES encryption via pdf-lib-plus-encrypt, running entirely in your browser. You set a user password that must be entered to open the file, and optionally an owner password that controls permissions such as printing, copying or editing. The encryption is performed locally; the file never passes through any server.

The AES encryption applied here is the same algorithm used across many standard PDF viewers and is supported by Adobe Acrobat, macOS Preview, and most PDF readers. When a recipient opens the protected PDF, their viewer prompts for the password before displaying the content. Note that password protection is only as strong as the password chosen: a short or common password can be brute-forced by a determined attacker with the right tools. Choose a password that is long and not a dictionary word for meaningful protection.

How to use Password-protect PDF, step by step

  1. Load the PDF you want to protect.
  2. Enter a user password that recipients will need to open the file.
  3. Optionally enter an owner password to restrict printing, copying or editing.
  4. Click encrypt and download the protected PDF.
  5. Share the password with intended recipients through a separate channel.

Common use cases

  • Protect a PDF containing personal or financial data before sending it by email.
  • Lock a PDF template so recipients can view but not edit or copy the content.
  • Add an open-file password to a confidential report before distributing it to a limited group.
  • Restrict printing of a draft document that is shared for comment only.

Frequently asked questions

What encryption algorithm is used?

pdf-lib-plus-encrypt applies AES (Advanced Encryption Standard) encryption, the algorithm specified in the PDF standard for strong protection. The key length used follows the PDF specification for AES-128 or AES-256 depending on the version flag set in the library.

What is the difference between the user password and the owner password?

The user password must be entered to open and view the PDF. The owner password controls permissions: a PDF with only an owner password can be opened without a password by anyone, but certain operations such as editing or copying require the owner password. Setting both passwords gives you control over both access and permissions.

Can the password be recovered if I forget it?

No. The encryption is applied locally and no password is stored anywhere. If you lose the user password, the file cannot be opened. Keep a copy of the unencrypted original and store the password securely.

Does the PDF leave my device when I encrypt it?

No. pdf-lib-plus-encrypt runs the encryption process entirely inside your browser tab. Your file is read into browser memory, the encryption is applied there, and the protected PDF is written out as a local file. The document is never transmitted to any server.

Will the protected PDF work in all PDF viewers?

AES-encrypted PDFs are opened by all major viewers including Adobe Acrobat Reader, macOS Preview, PDF.js-based viewers and most mobile PDF apps. Very old or lightweight viewers may not support AES. In those cases, the viewer will inform the user that the file cannot be opened.

Is password protection enough to keep my PDF secure?

A strong, unique password provides meaningful protection against casual access. Against a determined attacker with specialised decryption tools, the protection scales with password length and complexity. For highly sensitive documents requiring certified security, consult a document security specialist.

Do I need an account to password-protect a PDF?

No. There is no sign-up and no account. You type the password directly in the tool and the encryption is applied there.

Can I add a password to a PDF from my phone?

Yes, the encryption runs in plain JavaScript inside the browser tab, working the same on mobile Chrome or Safari as on desktop. Typing a long, unpredictable password is easier with a physical keyboard, so double-check it before closing the tool on a phone.