Home PDF tools Protect PDF

Protect PDF

Add a password to a PDF or lock down what a reader may do with it, using AES-256 encryption applied in your own browser. Choose Require a password to open to close the file to everyone without the password, or Restrict printing & copying only to leave it readable but ask readers not to print, copy or edit it. The file is encrypted on your device, the before-and-after sizes are measured on your document, and nothing is uploaded.

FileNo file loaded
Pages
Original size
Protected size
Encryption
No PDF loaded yet.

A password to open is the strongest option: the file is AES-256 encrypted and cannot be read without it.

The password is used in this tab only and is never sent anywhere. There is no password recovery: if you lose it, the file cannot be opened again by this or any other tool. Save it in your password manager first, and keep an unprotected copy of the original.

Permission flags are a request, not a lock. A reader that respects them will grey out printing and copying; a reader that does not will ignore them completely, and the file opens without any password in either case. Use the password-to-open mode if the content really must stay closed. The owner password needed for this mode is generated randomly in your browser and does not have to be remembered.

Choose a PDF file to begin.

The encryption runs inside this page with a WebAssembly build of qpdf, loaded on the first press of the button — so the first run also downloads the encryption engine. Your file is never uploaded: there is no server, no account and no copy of the document anywhere but your own device.

What is PDF password protection?

PDF password protection means writing the document so that its contents are encrypted, and adding the information a reader needs to decrypt them. A protected PDF behaves like any other PDF in a file listing, but when it is opened the reader asks for a password, or refuses an action such as printing, depending on what was written into the file.

There are two different things you can add, and they are not equally strong. The first is an open password, which is what people mean by “password protect a PDF” or “lock PDF with password”: the document is encrypted with a key derived from that password, and without it the reader gets nothing — no text, no images, not even a blurred preview. The second is a set of permission flags, sometimes called restrictions: the file is encrypted so the flags cannot be edited out with a text editor, but it still opens for everyone, and the flags are a message to the reader rather than a wall. A reader is allowed to ignore them.

This page offers both, side by side and clearly labelled, so you can pick the one that matches why you are protecting the file. Everything happens in your browser with the open-source qpdf encryption engine compiled to WebAssembly: the file is read from your disk, encrypted on your device, and handed back to you as a download. Nothing is uploaded, and the page prints the exact size before and after the run so you can see what the encryption cost.

How to protect a PDF

  1. Press Choose a PDF file and pick the document you want to protect. The tool shows the file name, the page count and the size, and checks that the file can be read — nothing is uploaded.
  2. Pick a protection mode. Require a password to open encrypts the file so it cannot be read without the password. Restrict printing & copying only leaves the file readable by anyone and adds permission flags.
  3. If you chose the password mode, type the password and then type it again in the confirm field. It must be at least 6 characters, and the two entries must match; the page refuses to run otherwise and produces no file.
  4. If you chose the restrictions mode, tick or untick Allow printing, Allow copying text and images and Allow modifying the document. A random owner password is generated in your browser to apply those flags.
  5. Press Protect PDF. The first press also loads the encryption engine, so it takes a moment; after that the run itself is quick, because the work happens on your own machine.
  6. Read the readout — original size, protected size and the number of pages found when the new file is opened again — then press Download to save <your-file>-protected.pdf. Your original file on disk is never modified.

Worked example

The test files here were built for this page and every number below is what this page reported in a browser. The main one is client-brief.pdf: 4 A4 pages of text, 6,197 bytes (6.05 KB), with the font and text stored normally.

Three inputs are refused with a message and no download, and that was checked in the browser as well: a 5-character password is rejected as too short, two passwords that do not match are rejected, and a PDF that is already encrypted cannot be read at all, so the page tells you to unlock it first rather than writing a broken file.

Who is this PDF protection tool for?

What AES-256 protection does here — and what it does not do

The engine on this page is qpdf, an established command-line PDF tool, compiled to WebAssembly and run inside your browser tab. The encryption it applies at this setting is AES-256 at revision 6 of the PDF standard (R6): 256-bit keys, AES-256 for both strings and streams, and a modern key-derivation function. Local qpdf 12.3.2 reads the files this tool writes back as R = 6 with file encryption method: AESv3, which is the same revision and the same cipher family used by current versions of commercial PDF software. There is no weaker option on this page and no way to ask for one.

qpdf rewrites the container rather than the pages. The page content, the fonts, the page count and the layout are copied as they are; what changes is that the objects become encrypted and an encryption dictionary is added. That is why a protected file is a little larger than the original, why the text is still selectable and searchable once the file is open, and why this tool cannot damage a document the way a rasterising conversion can.

 Require a password to openRestrict printing & copying only
What a reader seesA password prompt. Nothing is displayed before the password is accepted.The document, immediately — there is no open password.
What it stopsReading the file at all, for anyone without the password.Nothing by itself; it asks a well-behaved reader not to print, copy or edit.
What it does not stopAn offline guessing attack on a weak password, however long it takes.A reader that ignores the flags, or a tool that clears them once it can open the file.
Password needed to openYes — the one you type on this page.No. A random owner password is generated here just to apply the flags.
Encryption appliedAES-256 (R6), AESv3 strings and streams.AES-256 (R6), AESv3 strings and streams.

Two limits deserve to be stated next to the controls, not buried. First, encryption strength is not password strength: anyone who has the file can try passwords against it on their own machine for as long as they like, because the check happens on the file itself with no server to rate-limit it. A short or obvious password is the weakest part of the chain, whatever the cipher. Second, permissions are not enforceable. The flags this page writes are part of the PDF standard and most readers respect them, but they are advice, not access control; only the open password actually keeps a document closed. And there is no third limit to soften the message: if you lose the open password, the file is gone for good — the page has no recovery path and no back door, by design.

One more thing this page is not: it only ever adds protection. It cannot remove a password, it cannot lift printing or copying restrictions, and it cannot restore access to a file whose password is already lost — the tool that does the reverse needs that password too. So protect a document while you still have it open. Choosing to protect a file is a decision you cannot undo here without the password you set, and if you arrive with a file you cannot open, the answer is to find the password, not to re-run this page.

Common use cases

Pro tips

FAQ

Are my PDFs uploaded to a server?

No. The file is read from your disk by your own browser, encrypted inside the page by a WebAssembly build of qpdf, and handed back as a download. Nothing is uploaded, no copy is stored, no account or email address is needed, and the encryption still runs if you disconnect from the network after the page has loaded.

Which protection mode should I choose?

Choose Require a password to open when the document must stay closed to anyone who does not have the password — that is the only setting that actually stops a file being read. Choose Restrict printing & copying only when the file has to open for everyone but you want to ask readers not to print, copy or edit it.

What kind of encryption does this tool use?

AES-256 at revision 6 of the PDF standard (R6), with 256-bit keys and AES-256 for both strings and streams. That is the strongest encryption a current PDF reader is expected to support, and it is applied by qpdf compiled to WebAssembly inside your browser tab. There is no lower or weaker option on this page.

Can I recover the PDF if I forget the password?

No. The tool cannot recover, guess or reset a password you have lost, and neither can we: the password is never sent anywhere and never stored, so there is nothing on any server to recover it from. Save it in your password manager before you close the page, and keep an unprotected copy of the original file.

How strong does the password need to be?

The tool requires at least 6 characters, and it refuses to run with anything shorter. Length matters most, because an attacker who has the file can try passwords offline for as long as they like. A passphrase of several unrelated words is easier to remember and stronger than six characters you will not remember — and there is no recovery if you lose it.

Do the printing and copying restrictions actually stop anyone?

Treat them as a request, not a lock. The permission flags are written into the file and a well-behaved reader honours them, but a viewer is free to ignore them and any desktop tool that can open the file can clear them. Only the open password in the first mode actually stops a document being read.

Can I remove the password again later?

Yes, if you know the password: use the Unlock PDF tool to take the encryption off again. In the password-to-open mode the password you type is used as both the open password and the owner password, so the same password also lets you change or remove the protection later.

Can I protect a PDF that is already password-protected?

No. A file that is already encrypted cannot be read by the tool, and the page says so instead of writing a broken download. Remove the existing password first with the Unlock PDF tool, then protect the unlocked copy with the password and settings you want.

Is the text still selectable after protection?

Yes, for anyone who can open the file. Encryption changes how the document is stored; it does not rasterise a page or turn text into a picture. Someone with the password can select, copy, search and print the text exactly as before, and the page count and layout are unchanged.

Does protecting a PDF change the file size?

It grows a little, because the encryption dictionary and the per-object encryption overhead are added to the file. The page shows the exact before and after sizes of your own document after every run, so the cost is measured on your file rather than promised in advance.

Can I password protect a PDF on my phone?

Yes. The page works in the browser on iOS and Android and the download behaves the same way. The first press loads a 1.2 MB encryption engine over your connection, so on mobile data that first run can take a moment; the document itself never leaves the device.

Does this tool add a watermark or change my pages?

No. Nothing is drawn on top of your pages: no watermark, no stamp, no extra page and no re-compression. The tool only rewrites the container with encryption applied, so the pages come out as they went in and the protected file carries the same number of pages.

Related searches

password protect pdf, protect pdf, add password to pdf, encrypt pdf online, pdf encryption, lock pdf with password, secure pdf file, pdf password protect free, password protect pdf online free, encrypt pdf without acrobat, how to password protect a pdf, add open password to pdf, restrict pdf printing and copying

Related tools