Skip to main content

How to Password-Protect a PDF (and What the Two Passwords Do)

Security5 min read

A PDF can carry two different passwords, and mixing them up is the most common reason people think a file is protected when it is not. The user password (sometimes called the open password) is required to open the document at all. The owner password (the permissions password) controls what someone can do after opening it, such as printing or copying text.

This guide explains how to set each one in TokPDF’s Protect PDF tool, how strong the encryption is, what permissions can and cannot prevent, and how to remove protection from your own files. Encryption runs in your browser with qpdf, a widely used open-source PDF library compiled to WebAssembly. Neither your file nor your password is uploaded.

Try it now

Opens the tool in your browser. No sign-up needed.

User password vs owner password

The two passwords protect against different things, and only one of them is real protection.

User (open) passwordOwner (permissions) password
Needed to open the fileYesNo
Encrypts the contentYes, with a key derived from the passwordThe content is encrypted, but readers can decrypt it without asking anyone for a password
What it stopsAnyone without the password from reading the documentPrinting, copying, editing and similar actions, in readers that choose to respect the flags
How strongAs strong as the password you chooseA deterrent, not a barrier: many tools ignore or remove it

Protect a PDF in four steps

  1. Open Protect PDF and add your file.

  2. Enter a User Password if people should need a password to open the document.

  3. If you also want to limit what readers can do, enter a different Owner Password and untick the actions you want to block: printing, modifying, copying, annotating, filling forms, accessibility and page assembly. Everything is allowed by default.

  4. Click to encrypt and download the protected copy, which ends in _encrypted.pdf. Open it once to check that the password works before you send it.

Which combination should you use?

TokPDF needs at least one password. What you get depends on which fields you fill in:

  • User password only. The file needs a password to open. TokPDF sets the owner password to the same value, so anyone who can open the file has full rights and the permission checkboxes have no effect. This is the right choice for most confidential documents.
  • Owner password only. The file opens without a password, and the permission restrictions apply in readers that honour them. Useful for a published brochure you would prefer people not edit, but not for anything secret.
  • Both, and different. People with the user password can open and read within the permissions you set; only the owner password unlocks everything. Use this when recipients should read but not print or copy, keeping in mind the limits below.

How strong is the encryption?

TokPDF always uses AES-256, the strongest encryption the PDF standard defines. It is supported by Adobe Acrobat and Reader since version X (10), and by current versions of Preview, Chrome, Edge, Firefox and most mobile PDF apps. There is no option to fall back to older, weaker schemes such as RC4 or 128-bit AES, so very old PDF software may not open the file.

In practice, the weak point is the password, not the cipher. Anyone who obtains the file can try passwords offline as fast as their hardware allows, with no lockout after failed attempts. A short word or a date can be guessed quickly; a passphrase of four or more unrelated words, or 12 or more random characters, is far beyond practical guessing.

Send the password through a different channel from the file. If you email the PDF, share the password by phone or messaging app, so that one intercepted message is not enough.

What permissions cannot do

Permission flags are instructions to the reader software. Acrobat and most mainstream readers respect them, but nothing in the encryption forces a program to. Many free tools, including TokPDF’s own Remove Restrictions, can rewrite a PDF without its permission flags as long as it opens without a user password. And anything that can be displayed can be photographed or screen-captured.

So treat permissions as a polite request that stops casual copying and accidental edits. For documents where copying would cause real harm, use a user password, share the file only with people you trust, and consider a visible watermark with the recipient’s name using Add Watermark.

Removing a password or restrictions from your own PDF

TokPDF has three tools for files you already own or are allowed to modify. None of them can crack an unknown password.

  • Unlock PDF removes all protection when you enter the user or owner password. Leave the field empty for a file that only has an owner password.
  • Remove Restrictions strips the permission flags from a file that opens without a password, even if you do not know the owner password. It cannot open a file that needs a user password.
  • Change Permissions updates the passwords or permissions of an already protected file. Enter the current password, then set a new owner password, because restrictions are only enforced when the file is encrypted.

Frequently asked questions

Can TokPDF recover a forgotten PDF password?
No. TokPDF does not crack or guess passwords. If you have lost the user password of an AES-256 file, the content cannot practically be recovered, so keep passwords in a password manager.
Is my password sent anywhere?
No. The password is used in your browser to encrypt or decrypt the file and is not stored or uploaded.
Why can my colleague still copy text from my restricted PDF?
Their PDF reader may ignore permission flags, or the file has a user password but no separate owner password, in which case opening it grants full rights. Set a different owner password and keep in mind that permissions are not enforceable.
Does password protection change how the PDF looks?
No. Pages, text and images are unchanged. Readers just ask for the password, or disable restricted actions.
Can I protect several PDFs at once?
Protect PDF handles one file at a time. If the files belong together, merge them first and protect the single result.

Try it now

Opens the tool in your browser. No sign-up needed.

TokPDF

Professional PDF Tools - Free & Private

Security

  • Secure processingEncrypted connection (HTTPS)
  • No sign-up neededStart using any tool right away

Privacy

Your data is never sold
Free · Secure · No sign-up
Select Language

© 2026 TokPDF. All rights reserved.

Based on the open-source project PDFCraft (AGPL-3.0)PrivacyTerms of Use