LocalTools All tools →

Protect PDF

Add a password to a PDF you own. Real AES-128 or AES-256 encryption, permission controls, and a password strength meter. Runs entirely in your browser — nothing is uploaded.

Upload a PDF

⬆
Drop a PDF here or click to browse

Add a password and set permissions to protect the file

No upload · No signup · Works offline

Add a password to a PDF you own

This tool encrypts a PDF with a password and produces a new protected file. Every modern reader — Adobe Acrobat, Preview, Chrome, Firefox, Edge, iOS Files, Android's built-in viewer — will prompt for the password and open the file. The encryption is real: AES-256 or AES-128, the standard algorithms built into the PDF specification.

Everything runs in your browser using WebAssembly. Your PDF and your password are read into memory, used to derive an encryption key, and written back to disk by your own device. No PDF is ever sent to any server, and your password is never transmitted, logged or retained.

Only for PDFs you have the right to protect

Adding a password to a document you own — a bank statement, an insurance policy, a tax return, a signed contract — is a normal part of information hygiene. Adding a password to someone else's document without permission is not.

Some jurisdictions treat unauthorised encryption of another person's file as a form of interference with their property. Some employers treat it as a violation of acceptable-use policies. The tool doesn't check any of this; it just runs. Use your judgement.

Two passwords, two purposes

PDFs support two different passwords, and they control different things:

PasswordWhat it controlsWho needs it
User password Required to open the file at all. Without it, the reader shows a password prompt and refuses to display content. Everyone who opens the file
Owner password Required to change permissions, remove the password, or edit restricted parts. Only the person who originally set the password

If you only set a user password, this tool generates a random owner password that you never see. That means nobody — including you — can later change the permissions without the file being re-created. For most documents, that's fine. If you want to keep control over permissions, set an owner password too.

How to add a password

  1. Drop the PDF. Click the drop zone or drag a file onto it.
  2. Enter the user password twice. The Protect button stays disabled until both fields match, so typos can't slip through.
  3. Check the strength meter. Weak passwords are the biggest cause of leaked documents. Aim for 12+ characters with a mix of cases, digits and symbols.
  4. Optionally set an owner password. Leave blank to auto-generate a random one.
  5. Choose permissions. Decide whether the recipient can print, copy text, edit, or annotate.
  6. Pick encryption strength. AES-256 is the default and works everywhere.
  7. Click Protect PDF. The tool encrypts the file in your browser.
  8. Download. The protected PDF saves with -protected appended to the filename.

Permissions explained

The four permission controls let you decide what a reader can do with the file once it's open:

PermissionControlsWhen to disable
Allow printingWhether the file can be sent to a printer or a PDF-to-image tool.Confidential documents that shouldn't be on paper.
Allow copying textWhether text can be selected and copied.Documents where quote leakage is a concern.
Allow editingWhether the content can be modified by a PDF editor.Contracts and signed documents.
Allow annotationsWhether comments, highlights and digital signatures can be added.Rarely. Most workflows need this on.

Permissions are advisory — they're a standard part of the PDF format, and well-behaved readers honour them. But a determined user with specialised tools can bypass them. If you need a guarantee that content can't be extracted, use full-disk encryption or don't share the file at all.

Choosing between AES-128 and AES-256

Both are part of the PDF standard and both are strong enough that no practical attack exists against them. The differences are practical, not security-critical:

  • AES-256 — introduced in PDF 2.0 and supported by every reader released in the last 15 years. This is the default and the correct choice for almost everyone.
  • AES-128 — introduced in PDF 1.6 and supported since roughly 2005. Choose this only if you have to open the file in very old software — Acrobat 6 or 7, or a custom reader built before 2008.

Both modes produce files that open with a password prompt in every modern reader. Both are unaffected by the security of the underlying password itself — a weak password is weak regardless of AES strength.

Password best practices

Encryption is only as good as the password. Three rules matter:

  • Length beats complexity. A 16-character passphrase made of four random words is stronger than a 10-character string of symbols, and much easier to remember or type.
  • Don't reuse passwords across files. If one PDF is brute-forced, every PDF protected with the same password falls with it.
  • Store it in a password manager. This tool doesn't retain your password. If you close the page and forget the password, the file is gone. Password managers like Bitwarden, 1Password or KeePass are the right place to keep it.

Common weak passwords to avoid: dates of birth, pet names, phone numbers, single dictionary words, and anything under 10 characters. Those can be brute-forced in minutes.

How the encryption works

The tool uses qpdf compiled to WebAssembly. qpdf is a command-line tool used by archivists, libraries and law firms for PDF transformations, and its encryption code is well-audited. It implements the standard algorithms defined in the PDF specification:

  1. Your user password and owner password are fed through a key-derivation function (PBKDF for AES-256, or a hash-based scheme for AES-128) to produce two separate encryption keys.
  2. Every content stream in the PDF is encrypted with the user password key using AES in CBC mode.
  3. The user password hash and owner password hash are stored in a standard encryption dictionary at the head of the file, exactly as every PDF reader expects.
  4. The permission flags you set are encoded in the same dictionary, and signed with the owner password key.
  5. The result is a normal protected PDF that behaves identically to one produced by Adobe Acrobat.

Text stays selectable, images stay embedded at full quality, form fields stay editable (if you allow editing), links and bookmarks keep working. The file is encrypted in place, not re-rendered.

Common uses

  • Emailing sensitive documents. Bank statements, tax returns and medical records should never travel unprotected. Send the PDF with a password, and share the password over a different channel (Signal, phone call, in person).
  • Storing documents in cloud folders. If a file is on Google Drive, Dropbox or iCloud, a password is the last line of defence if the account is compromised.
  • Delivering client work. Freelancers often protect invoices or deliverables so only the paying client can open them.
  • Sharing HR documents. Employment contracts, offer letters and payslips should always be password-protected.
  • Legal filings. Some jurisdictions require password protection on electronically filed documents containing personal information.
  • Personal records. Long-term storage of identity documents, insurance policies, and anything you'd never want a stranger to see.

Your privacy is protected

Every operation happens in your browser. The PDF is read into memory, encrypted, and written back to disk by your own device. Your password is used to derive an encryption key inside the browser and never leaves it. No PDF and no password is ever sent to any server, logged, or retained.

The only network requests the page makes are for the WebAssembly library and the fonts. Both are loaded from your own site and public CDNs when the page first opens. After that, the tool works entirely offline.

This makes the tool safe for the most sensitive documents you have: bank statements, tax returns, medical records, ID scans, legal filings, personal correspondence.

What this tool can't do

Being honest about limits is more useful than pretending they don't exist. This tool does not:

  • Protect an already-protected PDF. Remove the existing password first with Remove PDF Password, then protect it again with the new password.
  • Recover a forgotten password. AES encryption has no backdoor. If you lose the password, the file is permanently locked. This is a feature, not a bug.
  • Guarantee permissions are enforced. PDF permissions are reader-enforced, not cryptographic. A determined attacker with specialised tools can extract content from a protected PDF. Use full-disk encryption if the content must never leak.
  • Add digital signatures or certificates. This tool adds password encryption only. Digital signatures with a certificate chain require a PKI setup.
  • Handle DRM or Adobe Digital Editions. Those use a different system tied to an Adobe account.
  • Encrypt very large PDFs quickly. Files over 200 MB take longer because WebAssembly must process the entire file in memory.

Troubleshooting

  • Protect button stays disabled — the two password fields don't match, or the user password field is empty. Both must be filled and identical.
  • "Passwords do not match" — check for trailing spaces. Paste-in passwords from a password manager sometimes include a line break.
  • Protected PDF won't open in an old reader — switch to AES-128 for compatibility with pre-2008 software.
  • Protected PDF won't open at all — verify the password by opening it in a different reader. If you've forgotten it, there's no recovery.
  • WebAssembly failed to load — the CDN is blocked or you're offline before the first page load. Refresh the page once. After that, the tool works offline.
  • Encryption is very slow — the PDF is over 100 MB. Wait for the progress bar. On a modern laptop, 100 MB takes about 5–15 seconds.
  • Mobile browser crashes — memory limit reached. Try protecting on a desktop browser, or reduce the file size with Compress PDF first.

Common questions

Is the encryption real?

Yes. This tool uses qpdf compiled to WebAssembly, which implements the standard PDF encryption algorithms. AES-256 and AES-128 modes produce files that Adobe Acrobat, Preview, Chrome and every other PDF reader recognises and prompts for a password.

Can I protect a PDF I don't own?

You can, but you shouldn't. Adding a password to someone else's document without permission may violate copyright or contractual terms. Only protect files you own or have the right to modify.

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

The user password is required to open the file at all. The owner password is required to change permissions, remove the password or edit restricted parts. If you only set a user password, the tool generates a random owner password and you can't change permissions later without it.

What if I forget the password?

There is no recovery. Real AES encryption cannot be reversed without the password. If you lose both the user and owner passwords, the file is permanently locked. Store your password in a password manager before you close the tool.

Which encryption strength should I choose?

AES-256 for anything sensitive — financial records, medical documents, legal filings. AES-128 only for older readers that don't support AES-256, which is rare today.

Do the permission controls actually work?

PDF permissions are enforced by the reader, not by the encryption itself. Well-behaved readers like Adobe Acrobat honour them. Determined users with specialised tools can bypass them. Treat permissions as a deterrent, not a guarantee.

Will the PDF still open in every reader?

Yes. AES-256 and AES-128 are part of the PDF standard. Every modern reader — Adobe Acrobat, Preview, Chrome, Firefox, Edge, Foxit, Sumatra, iOS Files, Android's built-in reader — will prompt for the password and open the file.

Are my PDFs uploaded?

No. Everything happens in your browser. Your PDF and your password never leave your device.

Is my password sent anywhere?

No. The password is used to derive the encryption key inside your browser. It is never transmitted, logged or retained.

Can I protect a PDF that's already protected?

No. If a PDF is already encrypted, remove the existing password first with the Remove PDF Password tool, then protect it again with the new password.

Does it work on iPhone and Android?

Yes. Tap the drop zone to select a PDF from Files or Downloads, enter the password, and download the protected file directly to your device.

Does it work offline?

Yes. After the page loads once, the tool works entirely offline.

Can I remove the password later?

Yes, if you know the password. Use the Remove PDF Password tool with the user password to strip the protection.

What happens to form fields, links and bookmarks?

In most cases they are preserved. The tool encrypts the PDF in place without re-rendering pages, so text stays selectable, form fields stay editable (if you allow editing), and links keep working.