Privacy & security
How to Encrypt a File With a Password
Protect a document before emailing or storing it in the cloud. What strong file encryption looks like, how to choose a password, and how to do it in your browser.
Updated · 3 min read
Emailing a tax return, uploading scans of your passport to cloud storage, sending a contract over a chat app: in all of these, the file passes through servers you don't control. Encrypting it first means that only someone with the password can open it.
What makes encryption strong
Two parts matter:
- The cipher. AES-256 is the widely used standard, also used by banks and governments. A mode like GCM also detects tampering: if anyone changes a single byte, decryption fails instead of producing garbage.
- The key derivation. Your password isn't used as the key directly. A key derivation function such as Argon2id or PBKDF2 turns it into a key, deliberately slowly and with a random salt. That makes each password guess expensive for an attacker, even with powerful hardware.
What you should not rely on: old ZIP encryption ("ZipCrypto"), which is easy to break, or the "password" on a Word file saved with very old Office versions.
Encrypt a file in your browser
- Open File & Text Encryption.
- Drop one or more files. You can also switch to text mode and encrypt a message instead.
- Enter a password and confirm it. The strength meter shows how resistant it is to guessing.
- Encrypt and download. The file uses AES-256-GCM with a key derived via Argon2id, and the original file name is stored inside the encrypted data.
To decrypt, drop the encrypted file into the same tool and enter the password. Everything happens on your device; the file and the password are never uploaded.
Choosing the password
The encryption is only as strong as the password:
- Length beats complexity. A passphrase of five or six random words (
river-lamp-orbit-velvet-cactus) is stronger and easier to type thanP@ssw0rd!. - Never reuse a password from another account.
- Test it with the password strength checker, which estimates how long it would take to crack.
- Or generate one with the password generator.
Share the password separately
If the encrypted file and the password travel in the same email, the encryption adds almost nothing. Send the file by email and the password by text message or phone call, or agree on it in person.
There is no "forgot password"
Proper encryption has no back door. If the password is lost, the data can't be recovered by anyone, including the tool that encrypted it. Store the password in a password manager.
Alternatives
- 7-Zip (Windows): create an archive with AES-256 encryption and tick Encrypt file names. The recipient needs 7-Zip or a compatible tool.
- macOS Disk Utility: File → New Image → Image from Folder, with 256-bit AES encryption. Opens easily on Macs, not on Windows.
- Built-in PDF passwords: fine for PDFs, supported by every reader.
Browser encryption is a good fit when you want strong, modern encryption without installing software, on any operating system.
Frequently asked questions
Can the recipient open the file without the tool? The encrypted file uses a standard cipher, but a specific file layout. The recipient opens it with the same browser tool, which works on any device without installing anything. If they need to open it in a desktop program, 7-Zip archives are the most widely supported alternative.
How large can the files be? Files are encrypted in chunks, so even files of several gigabytes work. The limit is your device's memory for the finished download.
Is encrypting in the browser safe? The encryption uses the Web Crypto API built into your browser, and the page doesn't send your file or password anywhere. As always, only use it on a device you trust: malware on your computer could read the file before it's encrypted.
Should I encrypt files stored in the cloud? For sensitive documents such as ID scans, tax returns or medical reports, yes. Cloud storage is encrypted by the provider, but the provider holds the keys; encrypting yourself means only you do.