PDF Password Generator
Generate cryptographically random passwords or memorable multi-word passphrases using Web Crypto, measure their entropy in bits, and lock your PDF with AES-256 encryption on your device.
Runs pdf-lib in your browser, a 214 KB download the first time you run this tool. Open-source licenses
How to generate a password and protect a PDF
Choose Random characters (16, 24 or 32 characters) or Passphrase (7, 8 or 10 words), drop a PDF into the box above, and select Generate & Protect PDF.
Copy the generated password from the result panel and download your AES-256 encrypted PDF.
Unbiased Web Crypto generation
Passwords are drawn from window.crypto.getRandomValues using rejection sampling so every character or passphrase word has uniform probability with zero modulo bias.
Entropy bits and AES-256 encryption
Each setting shows its entropy, worked out from how the password is drawn: 99, 149 or 199 bits for 16, 24 or 32 random characters, and 77, 88 or 110 bits for a passphrase of 7, 8 or 10 words from the 2,048-word BIP-39 list (11 bits a word).
The PDF itself is encrypted with AES-256. The password opens it and is also its owner password: the file is saved with copying, editing and page assembly turned off and printing and form filling on, and anyone with the password can lift those limits.
Passphrases are longer than 32 characters. In our tests the PDF viewers of Chrome and Edge (PDFium), qpdf and pypdf opened them, but Poppler 24.02, which Linux readers such as Evince and Okular use, refused them; choose Random characters if the file will be opened there.
Neither your password nor your PDF is ever sent anywhere
Key generation and PDF encryption run strictly in your browser memory. Nothing is stored or transmitted.
Related tools
- Sign PDF: Add your drawn or typed signature to a file.
- PDF Checksum: Calculate SHA-256, SHA-384, SHA-512 and SHA-1 digests for a PDF and verify against an expected checksum.
- Compress PDF: Make a file smaller, or at or under a size you type.
- Merge PDF: Join several files into one, in the order you choose.
- Split PDF: Save pages or ranges of a file as new files.