Protect a PDF with a Password Online

To password-protect a PDF with OnCloudPDF, select the file, type a password, choose what readers may do (print, copy text, edit) and click Protect PDF.

  • Processed in your browser
  • No upload
  • No account
  1. 1Choose file
  2. 2Adjust and run
  3. 3Download

or drop a file here, or paste one with Ctrl V

Good to know: OnCloudPDF cannot recover a forgotten password and does not keep it. If you lose it, the file stays locked: keep the password somewhere safe. All limits

To password-protect a PDF with OnCloudPDF, select the file, type a password, choose what readers may do (print, copy text, edit) and click Protect PDF. The file is encrypted with AES-256 inside your browser using qpdf, so neither the PDF nor the password is uploaded, and the pages, links, bookmarks and forms are kept exactly as they were.

Updated · Runs in your browser, no upload, no account

How to use Protect PDF

  1. Select or drop the PDF you want to protect.
  2. Type the password twice. Anyone who opens the file will need it.
  3. Optionally untick Print, Copy or Edit to restrict what readers can do.
  4. Click Protect PDF and download the encrypted copy. Open it once to check the password works.

What it does and what it does not do

  • OnCloudPDF cannot recover a forgotten password and does not keep it. If you lose it, the file stays locked: keep the password somewhere safe.
  • The password to open the file is real protection (AES-256). The print, copy and edit switches are only requests that PDF viewers honour: some programs ignore them, and anyone can remove them with an unlock tool, including OnCloudPDF's Unlock PDF when no password is needed to open the file.
  • The file is encrypted, not hidden: its size and page count stay visible, and metadata such as title and author is encrypted together with the content.
  • Short or common passwords can be guessed. Use 12 or more characters; the tool warns below 8.
  • A PDF that already has a password must be unlocked first (the tool asks for its password). Certificate-based protection is not supported.
  • The tool enforces no file-size limit; the browser memory is the practical limit, and very large files need a few seconds.

Is my file uploaded?

The PDF and the password stay in your browser. Encryption runs locally with qpdf compiled to WebAssembly in a Web Worker that is closed afterwards. Nothing is sent to a server; the only download is the qpdf engine itself, from this site, the first time you use a security tool.

Password to open versus permissions

A PDF can carry two kinds of protection. The password to open decides who can read the file at all. Permissions only describe what a reader that already opened it may do: print, copy text or edit. This tool always sets a password to open. If you restrict permissions without giving your own owner password, a random one is generated and thrown away, so nobody can change the permissions later with a password; the restrictions still do not stop a determined person from using tools that ignore them.

Share a protected PDF safely

Send the file and the password through different channels, for example the PDF by email and the password by a messaging app. Prefer a long passphrase of several words over a short word with digits. The recipient needs a PDF reader that supports AES-256 (Acrobat, Chrome, Edge, Firefox, Preview and most current readers do).

Ways to password-protect a PDF

Ways to password-protect a PDF
CriteriaOnCloudPDFServer-based online toolsDesktop software
Where the file and password are processedIn your browserOn the provider's server (upload needed)On your computer
EncryptionAES-256 (revision 6)Varies by providerTypically AES-128 or AES-256
Account or installNo account, no installOften an account for large filesInstallation required
Keeps links, bookmarks and formsYes: the content is not redrawnVaries by providerVaries by product

Frequently asked questions

How do I put a password on a PDF?

Select the PDF, type a password twice, and click Protect PDF. The download is a copy encrypted with AES-256 that asks for the password every time it is opened.

Is my password or file sent anywhere?

No. The encryption runs in your browser with qpdf compiled to WebAssembly. The file and the password never leave your device.

Can I recover the password if I forget it?

No. OnCloudPDF does not store it and cannot recover or crack passwords. Keep the original unprotected file or write the password down.

Do the print, copy and edit options really stop people?

Only in viewers that respect them. They are requests stored in the file, and tools exist that ignore or remove them. The password to open the file is the real protection.

Which encryption does it use?

AES-256 with the PDF 2.0 security handler (revision 6), which current versions of Acrobat, Chrome, Edge, Firefox and Preview open. Very old readers may not.

Will the PDF look the same?

Yes. The pages are not redrawn, only encrypted, so text, images, links, bookmarks and form fields stay as they were.

Guides

See every tool and its limits on the PDF tools overview, or compare approaches in free PDF tools compared.