Add a password to a PDF

Lock a PDF with an open password and AES encryption. Runs on your device.

How it works

  1. Add your PDF
  2. Type a password and pick the rules
  3. Download the protected PDF

How to put a password on a PDF

To password protect a PDF, add the file, type an open password twice, press Protect PDF and download the copy, which is named after your file with -protected added. Anyone who opens that copy has to type the password first. The tool copies your pages into the encrypted file exactly as they are: text stays text, fonts and images are not redrawn, and the page count does not change. A 12-page report comes out as a 12-page protected report. The password is asked twice because a typing slip would lock the file for good, and this site cannot recover a forgotten password. Protected copies up to 30 MB are reopened with your password after saving, to check that the copy really opens and has the same number of pages, and the file is only offered for download if that check passes.

AES-256, AES-128 and the length of a password

AES-256 is the default and the newest encryption the PDF format defines. AES-128 is there for older readers that cannot open AES-256. The limits come from the format: an AES-256 password can be up to 127 bytes of UTF-8, which is 127 letters and digits, but only 42 Chinese characters, since each takes 3 bytes. An AES-128 password can be up to 32 Latin-1 characters, so it cannot hold emoji or non-Latin letters. The tool tells you when a password is over the limit. A strength hint under the open password uses the same rating as the Password Strength Checker. It is a rough guess from length and common patterns, not a promise, so a long phrase that is not on any list beats a short one with symbols.

Open password, owner password and permissions

The open password is needed to read the file. The optional owner password is a second password that may change the rules, and the rules are the three switches: allow printing, allow copying text and images, allow editing. Editing covers changing content, adding comments, filling forms and moving pages. If you switch a rule off and leave the owner password empty, the tool sets a random owner password and does not show it, so the rule binds everyone who opens the file with the open password. Be clear about what rules are. A reader program is asked to respect them, and many do, but they are a request, not a lock. Anyone with the open password can read the pages, and tools that ignore the rules can lift them. Only the open password keeps people out.

What it does not do

A PDF that already has a password is refused, with a link to Unlock PDF, so you can remove the old one first. A PDF that declares itself PDF/A is refused, because that format forbids passwords. A digital signature on the original no longer validates once the file is rewritten and encrypted. The tool does not hide the file name, and it does not protect copies you already sent. This site does not store your passwords and cannot recover a forgotten one, so pick a long, unique passphrase and keep it somewhere safe. Keep the original, unprotected file somewhere you trust.

Your file and your password stay on your device

The PDF is read and encrypted by code running in a background worker in this tab. There is no upload step and no server that receives your file or your passwords. The passwords live only in the form while the page is open: they are not saved in the settings, not put in the address bar and not sent to analytics, and the form is cleared when the protected copy is ready. The page counts visits with Google Analytics, using rough size groups such as 1 to 10 MB, never a file name, a password or any text from the document. A PDF over 200 MB or over 1000 pages asks you to confirm before it loads, because a very large file can run out of memory on a phone.

Frequently asked questions

How do I put a password on a PDF for free?

Add the PDF, type an open password and repeat it, then press Protect PDF. The download is a copy named like report-protected.pdf that asks for the password when opened. A 12-page PDF stays 12 pages, and the original file is not changed.

Should I pick AES-256 or AES-128?

Pick AES-256 unless a reader you must support cannot open it. AES-128 is the older choice and limits the password to 32 Latin-1 characters, while AES-256 takes up to 127 bytes. If a recipient reports that the file will not open, protect the original again with AES-128.

What is the difference between an open password and an owner password?

The open password is typed to read the file. The owner password is a second one allowed to change the printing, copying and editing rules. Leave it empty and switch a rule off, and a random owner password is set for you and thrown away, so nobody can lift the rule with it.

Can I stop people from copying or printing a PDF?

Only as a request. When you switch off printing or copying, the file asks reader programs not to allow it, and most respect that. A tool that ignores the rules can still do it, and anyone with the open password can read every page. The open password is the part that keeps people out.

I forgot the password. Can you recover it?

No. This site does not store the password and cannot recover it. A long, unique passphrase is hard to guess; a common word can be guessed by anyone who holds the file. Keep the unprotected original. If you still have the password but want the PDF open for everyone, use Unlock PDF with it.

Is my PDF or my password uploaded?

No. The PDF is processed in your browser and not uploaded, and the passwords stay in the form in this tab. They are not saved, logged or sent to analytics. The page counts visits with Google Analytics using rough size groups such as 1 to 10 MB.