← Back

PDF to Password-Protected ZIP

Packages a PDF into a password-protected ZIP archive (not native PDF encryption)

A pure front-end tool can't reliably encrypt the PDF file itself (that needs a dedicated encryption engine). Instead, this tool packs the PDF into a ZIP archive that requires a password to unzip — the effect is the same: it can't be opened without the password.
Choose a PDF file

About PDF to Password-Protected ZIP

This tool does not encrypt the PDF itself. Instead it packs your PDF into a ZIP archive that needs a password to extract, so anyone who receives the ZIP cannot get the PDF out without that password. That is different from a PDF's own open password: the PDF is left untouched, opening it never prompts for a password, and the password only matters at the moment the ZIP is extracted. The tool also works in reverse. Pick an encrypted ZIP made by this tool, enter the password, and the file inside is recovered.

How to use it

  1. Use the two buttons at the top, "Encrypt (PDF → encrypted ZIP)" and "Decrypt (encrypted ZIP → PDF)", to choose what you want to do. Switching modes clears the selected file and any result.
  2. To encrypt, click the dashed area under "Choose a PDF file" and pick your PDF. To decrypt, pick the encrypted ZIP instead. The dashed area then shows the file name.
  3. Type a password in the "Password" field. In encrypt mode a strength indicator (Weak, Medium or Strong) appears underneath. The password is shown as plain text, so be aware of who can see your screen.
  4. Click "Encrypt and generate ZIP" (or "Decrypt with password" in decrypt mode). Pressing Enter in the password field does the same. The button stays disabled until a file and a password are provided.
  5. On success the page shows "Done: file name". Click "Download" to save it. The encrypted file is named after the original with -protected.zip added; decrypting returns the first file in the archive under the name stored in it.

A worked check

To confirm this approach really works, we ran a local test using the same library the tool uses (zip.js). We packed 5200 bytes of dummy content (repeated text, not a real PDF) with the password Abc123!x. The resulting ZIP was 265 bytes; that is small only because the dummy text is highly repetitive, and a real PDF will behave differently, since many PDFs are already compressed and barely shrink. Extracting without a password failed with "File contains encrypted entry", a wrong password failed with "Invalid password", and the correct password returned all 5200 bytes. The test also showed that the file name inside the archive can still be listed without the password. In other words, the password protects the contents, not the name, so do not put sensitive details in the file name.

Supported range and known limits

  • This is not native PDF encryption. Once the recipient extracts the PDF, it is an ordinary unprotected file. If you need a PDF that asks for a password every time it is opened, or that restricts printing or copying, this tool cannot do that.
  • Encryption uses the zip.js library's default setting, which is AES encryption for ZIP. The recipient needs unzip software that handles AES-encrypted archives, such as recent versions of 7-Zip, WinRAR or Keka. Built-in extractors on some platforms and versions may not support it.
  • Decrypt mode is designed for archives made by this tool. It extracts only the first file in the archive. For a multi-file archive you get just the first entry. A wrong password, or an archive that does not fit, produces one general message: "Decryption failed. The password may be wrong, or the file was not created by this tool".
  • One file at a time. In encrypt mode the file picker lists PDF files by default; the tool does not verify that the chosen file really is a PDF.
  • The strength hint is a simple rule-of-thumb based on length, mixed case, digits and symbols. It is not a measure of real resistance to guessing. The password is displayed in plain text, and the tool neither stores nor recovers it; a lost password means the contents cannot be retrieved.
  • The whole file is handled in browser memory, so very large files may slow the page down or fail.

FAQ: How is this different from a PDF's built-in password?

A PDF's own password is written into the PDF, and every PDF reader asks for it when you open the file. This tool creates an encrypted ZIP with the PDF placed inside unchanged; only the extraction step asks for a password. After extracting, the recipient has a normal PDF with no restrictions. So it suits protecting a file while it is being sent or stored, but not situations where the document must ask for a password every time it is opened.

FAQ: How does the recipient open the file?

Send the .zip and the password through different channels, for example the file by email and the password by message. The recipient extracts it with AES-capable unzip software and the password. They can also come back to this page, switch to "Decrypt", choose the ZIP and enter the password to get the PDF. If their built-in extractor refuses the archive, a third-party tool such as those mentioned above is the fix.

FAQ: What if I forget the password?

It cannot be recovered. The tool does not keep the password and has no back door. The password you type is used directly for encryption, so losing it means the contents can no longer be extracted. Keep it somewhere safe; a password manager that generates long random passwords is a good choice.

FAQ: What counts as a good password here?

The indicator adds points for reaching 6 and 10 characters, mixing upper and lower case, including a digit and including a symbol. A score of 0 or 1 shows Weak, 2 or 3 shows Medium, and 4 or more shows Strong. That is only a rough guide. In practice, longer and more random is better, and you should avoid birthdays, phone numbers and common words. For sensitive files, choose a long random password.

Privacy and how files are processed

Packing and unpacking both happen in your browser. The PDF is read locally, the encrypted ZIP is built by the zip.js library running in the page, and the download uses a temporary local link. The tool does not send your files or your password to a server and does not ask you to sign in. Closing or refreshing the page removes the file and password from the page. Remember that the password box shows its contents in plain text, so use the tool somewhere private.