Pricing P2P Encrypted Chat Desktop App Browser Extension
Upload a file
← Back to Blog

How to Password Protect Any File Before Sharing

— Written by Brendan, Founder of FileShot.io

Password protection for files showing a digital lock and shield for secure file sharing

Password protecting a file before sharing it adds a critical layer of security. Even if the download link is intercepted, forwarded, or leaked, the file remains locked without the correct password. This guide covers how to password protect a file for every major format — PDF, ZIP, Word, Excel — plus a universal method that works with any file type.

Why Password Protect Files Before Sharing?

Sharing files online introduces risk. Email can be forwarded. Cloud links can be guessed. Chat messages can be screenshotted. A password adds a second barrier: the recipient needs both the link and the password to access the file. This is especially important for sensitive data like contracts, financial records, medical documents, tax returns, and legal filings.

Password protection also gives you control after sharing. If you discover the link was shared with unintended recipients, the password still prevents access. Combine it with an expiration date and download limit, and you have a robust access control system without any complex setup.

Method 1: Password Protect a ZIP File

Creating a password protected zip file is the most common way to secure any file type before sharing. The contents are compressed and encrypted together.

Windows (7-Zip — Free)

  1. Download and install 7-Zip (free, open source) from 7-zip.org
  2. Right-click the file or folder you want to protect
  3. Select 7-Zip > Add to archive
  4. Set the archive format to zip (or 7z for stronger encryption)
  5. Under Encryption, enter your password in both fields
  6. Set the encryption method to AES-256
  7. Click OK

Important: Use the 7z format with AES-256 for the strongest protection. The standard ZIP format uses the older ZipCrypto algorithm, which has known weaknesses. If the recipient can extract 7z files (most modern tools can), prefer 7z over zip.

Mac (Built-in Terminal)

  1. Open Terminal
  2. Run: zip -e protected.zip yourfile.pdf
  3. Enter and verify the password when prompted

This creates a password-protected ZIP using ZipCrypto. For AES-256 on Mac, install 7-Zip via Homebrew: brew install p7zip, then use 7z a -p -mhe=on protected.7z yourfile.pdf.

Method 2: Password Protect a PDF

PDFs have built-in password protection through the PDF standard. You can set both an "open password" (required to view the file) and a "permissions password" (restricts printing, copying, and editing).

Using FileShot's PDF Editor (Free, No Software Install)

  1. Go to FileShot PDF Editor
  2. Upload your PDF
  3. Use the password protection option to set an open password
  4. Download the protected PDF

The entire process runs in your browser. Your PDF is never uploaded to any server.

Using Adobe Acrobat

  1. Open the PDF in Acrobat
  2. Go to File > Protect Using Password
  3. Choose Viewing to require a password to open the file
  4. Enter the password and save

Using LibreOffice (Free)

  1. Open the file in LibreOffice
  2. Go to File > Export as PDF
  3. In the Security tab, set the open password
  4. Click Export

Method 3: Password Protect Word and Excel Files

Microsoft Office documents support password encryption natively. Modern versions use AES-256 encryption.

Word (.docx)

  1. Open the document in Word
  2. Go to File > Info > Protect Document > Encrypt with Password
  3. Enter the password
  4. Save the file

Excel (.xlsx)

  1. Open the spreadsheet in Excel
  2. Go to File > Info > Protect Workbook > Encrypt with Password
  3. Enter the password
  4. Save the file

Note: Excel has two separate protections — "Encrypt with Password" (prevents opening) and "Protect Sheet/Workbook" (prevents editing but does not prevent viewing). For secure file sharing, always use "Encrypt with Password." The sheet/workbook protection is trivial to bypass and does not encrypt the file.

Method 4: Password Protect Any File (Universal Method)

The methods above work for specific file types. To password protect any file — images, videos, databases, source code, CAD files, anything — use an encrypted file sharing service with built-in password protection.

Using FileShot (Any File Type, Free)

  1. Go to fileshot.io
  2. Drop your file onto the upload area
  3. Before or after upload, click the password protection option
  4. Set your password
  5. Copy the encrypted sharing link
  6. Send the link to your recipient through one channel and the password through a separate channel

FileShot encrypts the file with AES-256-GCM in your browser before upload. The password adds a second layer on top of the encryption. Even if someone obtains the link, they cannot decrypt the file without the password. The server never sees the password or the decryption key.

Password Strength Rules

A password-protected file is only as secure as its password. Follow these rules:

  • Minimum 12 characters — Shorter passwords can be cracked in hours with modern hardware
  • Mix character types — Uppercase, lowercase, numbers, and symbols
  • Avoid dictionary words — "Password123!" is not secure despite meeting complexity rules
  • Use a passphrase — "correct-horse-battery-staple" is stronger and easier to remember than "P@55w0rd"
  • Never reuse passwords — Each shared file should have a unique password
  • Send the password separately — Never include the password in the same email or message as the file link. Use a different channel: text message, phone call, or encrypted chat

Password Protection vs. Encryption: What Is the Difference?

Password protection and encryption are related but different:

  • Password protection alone can mean the file is only gated by a password check, without the underlying data being encrypted. Some PDF "password protection" modes only restrict printing or editing — the content is still readable in the file's raw bytes.
  • Encryption transforms the file data into unreadable ciphertext using a cryptographic algorithm. The password derives the decryption key. Without the key, the data is mathematically unreadable.

For genuine security, you need password-based encryption, not just a password gate. Modern Office documents (DOCX, XLSX) and 7z archives use AES-256 encryption. Older formats (DOC, XLS, standard ZIP) use weaker algorithms that can be bypassed.

How to Send Password Protected Files

Once you have a password-protected file, you need to transfer it securely:

  1. Upload to FileShot — Drop the file, get an encrypted link. The file is encrypted again by FileShot on top of your local password protection, giving you two layers of security.
  2. Send the link via email — Paste the FileShot link into your email. The recipient clicks to download.
  3. Send the password via a different channel — Text the password, call them, or use an encrypted chat app. Never send both in the same message.

This two-channel approach means an attacker would need to compromise two separate communication channels to access your file.

Frequently Asked Questions

Can password-protected files be hacked?

Files protected with AES-256 encryption (7z archives, modern Office documents, FileShot) cannot be decrypted without the correct password using current technology. However, weak passwords can be cracked through brute force or dictionary attacks. Use a strong passphrase of 12+ characters.

How do I password protect a zip file on Windows without 7-Zip?

Windows File Explorer can create ZIP files but does not support adding passwords natively. You need a third-party tool like 7-Zip (free), WinRAR, or WinZip. For a no-install option, upload the file to FileShot and set a password — the file is encrypted and shared via a link.

Can I password protect a file on my phone?

On iPhone and Android, you can use FileShot in your mobile browser to upload and password protect any file without installing an app. For local file protection, most mobile file managers support creating encrypted ZIP archives.

What happens if I forget the password?

If the file uses proper AES-256 encryption, there is no recovery mechanism. The password is the only way to derive the decryption key. This is by design — if there were a backdoor, the encryption would be meaningless. Always store passwords in a password manager.

Conclusion

Password protecting a file before sharing is one of the simplest and most effective security measures you can take. For individual file types, use the built-in tools (Word, Excel, PDF, 7-Zip). For any file type with no software installation required, use FileShot — your file gets AES-256 encryption plus password protection, and the recipient needs only a browser to access it.

Related Guides