PDF Locker & Unlocker – Password Protect PDFs | TempScript
100% browser-based • Files never leave your device

PDF Locker & Unlocker

Add password protection to PDF files or remove passwords from files you own. Locking uses AES-256 encryption. Unlocking requires the correct password — this tool cannot crack or bypass protection. All processing happens locally in your browser.

PDF locker and unlocker tool

Private by design. PDFs are read, encrypted or decrypted, and rewritten entirely in your browser using pdf-lib and a WebAssembly encryption library. Your files and passwords are never uploaded, stored, or logged.

Drop a PDF here to lock

or click to browse — one file at a time

Encrypted PDFs can be unlocked with the correct password. Up to ~50 MB.

PDF locker and unlocker tool with password fields and mode tabs
Add or remove password protection on PDF files, all in your browser.

How to use the PDF locker and unlocker

  1. Choose a mode. Select Lock PDF to add password protection, or Unlock PDF to remove a password from a file you own.
  2. Upload a PDF. Drag a file onto the drop zone or click Choose PDF to browse your device.
  3. Enter a password. For locking, set a password and confirm it. For unlocking, enter the current password.
  4. Set permissions (lock mode). Optionally restrict printing, copying and editing. Leave them enabled to allow all actions.
  5. Click the action button. The tool encrypts or decrypts the PDF locally and offers a download when ready.

Key features and benefits

AES-256 encryption

Locked PDFs use AES-256, the current industry standard, so they open in every modern PDF reader.

Remove passwords

Unlock PDFs you own when you have the correct password, producing a new unprotected file.

Permission control

Choose whether recipients can print, copy text, or edit the document after unlocking it with the password.

Fully private

Files and passwords are processed locally in your browser. Nothing is uploaded, stored, or logged anywhere.

Show/hide passwords

Toggle visibility on every password field to check what you have typed before processing.

Responsive layout

Works comfortably on phones and tablets as well as desktop screens.

Privacy and limitations

  • Fully client-side. PDFs are read and rewritten entirely in your browser. Passwords are never transmitted to any server.
  • Unlocking requires the correct password. This tool cannot crack, bypass, or recover PDF passwords. If you do not know the password, you cannot unlock the file.
  • Encryption strength. Locked files use AES-256 encryption, which is supported by all modern PDF readers. Very old readers may not open them.
  • No automatic saving. Files are held in memory only. Reloading the page clears everything.
  • Memory limits. Files up to about 50 MB work well. Larger files may be slow because all processing happens in memory.
  • Legal use only. Use the unlock feature only on files you own or have permission to modify. Bypassing security on documents you do not own may be illegal in your jurisdiction.

Frequently asked questions

Are my PDF files uploaded to a server?
No. All locking and unlocking happens locally in your browser using pdf-lib and a WebAssembly-powered encryption library. Your files never leave your device.
Can I unlock a PDF without the password?
No. Unlocking requires the correct password. This tool cannot crack or bypass password protection. If you do not know the password, you will need to obtain it from the file's creator.
What encryption is used when I lock a PDF?
Locked PDFs use AES-256 encryption, which is the current industry standard. This is the same level of protection used by professional PDF software.
What is the difference between user and owner passwords?
The user password is required to open the document. The owner password controls permissions such as printing, copying and editing. In this tool the owner password is optional.
Is there a file size limit?
The tool works well with PDFs up to about 50 MB. Very large files may be slow because all processing happens in memory.

A practical guide to PDF password protection

PDF is the standard format for sharing documents that need to look the same everywhere. But its flexibility also makes it easy to accidentally share files you meant to keep private. Password protection gives you a simple way to control who can open a document, and permission settings give you finer control over what they can do with it once they have.

The two kinds of PDF passwords

The PDF specification defines two distinct passwords. The user password (sometimes called the open password) is required to open the document at all. Without it, a PDF reader will refuse to display the content. The owner password (sometimes called the permissions password) does not prevent opening the file. Instead, it controls what actions are allowed — printing, copying text, editing content, and filling in forms. A document can have a user password, an owner password, both, or neither.

This tool exposes both. When you lock a PDF, the password you enter is the user password. If you leave the owner password blank, it defaults to the same value. If you enter a separate owner password, it grants full access regardless of the restrictions.

What encryption actually does

PDF encryption does not scramble the visual appearance of the pages. Instead, it encrypts the streams of data that make up the document — the text, images, and other content. A reader that has the correct password can decrypt those streams and display the document. A reader that does not have the password sees only the encrypted data and cannot render anything. Modern PDF readers use AES-256 for this, which is the same standard used for secure web connections and encrypted drives.

Why unlocking requires the password

A common misconception is that "unlocking" means bypassing the password. It does not. Unlocking means using the password to decrypt the file and then saving a new copy without encryption. If you do not know the password, there is no legitimate way to unlock the file — the encryption is designed to prevent exactly that. Tools that claim to "crack" PDF passwords are usually either guessing weak passwords or doing something else entirely. If you own the file but have forgotten the password, the only reliable option is to recreate it from the original source.

Common pitfalls

  • Forgetting the password. If you lock a PDF and lose the password, the file becomes permanently inaccessible. Store passwords in a password manager.
  • Weak passwords. A short password can be guessed by automated tools. Use at least 12 characters with a mix of letters, numbers and symbols.
  • Permissions are not absolute. Some PDF readers and editing tools can ignore permission restrictions. Do not rely on them to prevent a determined user from copying content.
  • Encryption is not redaction. Anyone with the password sees everything in the file. To truly remove sensitive content, redact it permanently before locking.

About this tool

This PDF locker and unlocker is part of the TempScript free online tools collection. It runs entirely in your browser, requires no account, and never sends your files anywhere. If you work with PDFs regularly, you may also find our PDF merger and PDF compressor useful.

© 2026 TempScript. All rights reserved.