All PDFsansar tools

Protect PDF

Put a password on a PDF so it can't be opened without one. The encryption happens on your device, so neither the file nor the password ever leaves it.

Runs entirely in your browser

Drop a PDF here, or click to choose

Your file and your password both stay on this device.

How to password protect a PDF

  1. Drop the PDF onto the box above, or press “Choose a PDF file”.
  2. Type a password in “Password” and again in “Type it again”. The meter shows how strong it is.
  3. Write the password down somewhere safe. Nobody can open the file without it, and it cannot be recovered.
  4. Press “Protect & download”, then “Download protected PDF”.

What Protect PDF does

Putting a password on a PDF so it cannot be opened without one: a payslip going by email, a contract on a shared drive, medical or financial paperwork that should not be readable by whoever happens to open the attachment.

What it does

  • Encrypts the file with AES-256, the current PDF standard, using the password you choose
  • Sets the password as both the open password and the owner password, so the file genuinely will not open without it
  • Runs the encryption in your browser, so the file and the password both stay on this device
  • Leaves the pages exactly as they were: text stays text, links and bookmarks survive

What it does not do

  • Recover a password you forget; there is no reset, because nothing about it was ever sent to us
  • Offer the older 40-bit or 128-bit RC4 modes some tools still list, which are breakable with ordinary hardware
  • Stop somebody who knows the password from removing it again, or from copying what they can read on screen
  • Add a password to a PDF that already has one; remove the old one with Unlock PDF first

Last updated

Need to send this to someone?

Our sister site QRSansar hosts a document and gives you a short link and a QR code for it. That is handy for WhatsApp, a slide, a poster or a printed handout, and it avoids attachment size limits entirely. You can swap the file later and the link and QR code keep working.

Worth being clear about the difference: that is a hosting service, so your file is uploaded to it. Everything on PDFsansar stays on your device; sharing is the one job that cannot.

Share a document on QRSansar →

Other tools

All free, and all run in this tab without uploading anything.

Protect PDF: common questions

If the password never leaves my device, how is the file actually encrypted?

The encryption runs in your browser. The tool loads qpdf (the same open-source engine a lot of desktop software uses), compiled to WebAssembly, and it does the work on your machine using the password you typed. Nothing about the file or the password is sent anywhere, which is why we cannot help you if you forget it: there is nothing on our side to look up. You can prove this to yourself by turning off wi-fi before you press the button.

What happens if I forget the password?

The file stays shut. There is no reset link and no back door, and that is not a policy we could change: AES-256 has no shortcut, and we never had a copy of your password to begin with. This is the whole point of encrypting something, but it does mean a forgotten password on your only copy loses the document permanently. Keep the original, or put the password in a password manager, before you send the protected file anywhere.

How strong is the encryption?

AES-256, which is PDF 2.0 encryption and what every current reader supports. We do not offer the older 40-bit and 128-bit RC4 options some tools still list, because they are breakable with ordinary hardware and a file that says “protected” ought to be. The one thing encryption cannot do is stop someone who knows the password from removing it, or from copying what they can already read on screen.

Can somebody still open it without the password?

Not by opening the file. The page contents are genuinely encrypted, not hidden behind a flag a reader can ignore. That distinction matters, because “permissions-only” protection in some tools sets an owner password that leaves the document readable by anyone. This sets the user password too, so the file will not open at all without it.

Does protecting a PDF change how it looks?

No. Nothing about the pages is touched: the text is still text, the images are still images, links and bookmarks survive. Only the file's wrapper changes. The size usually goes up by a few hundred bytes for the encryption dictionary.