How do I password-protect a file?
Choose a file and enter a password, and this tool encrypts it with AES-256-GCM into a small .enc file you can download and store anywhere. Your password is stretched into a key with PBKDF2 (SHA-256, 250,000 rounds) and a random salt. Everything runs in your browser and the file is never uploaded.
Password-protect any file, without trusting a server
This tool locks a file behind a password so that only someone with that password can open it. You choose a file, type a password and press Encrypt: you get back a small .enc file you can email, store in a cloud drive or keep on a memory stick, safe in the knowledge that without the password it is just noise. To get the file back, whoever has the password loads the .enc file here, switches to Decrypt, enters the password and downloads the original.
Every step happens inside your browser through the built-in WebCrypto API. Your file and your password are never uploaded, logged or seen by anyone. You are not trusting this website with your data, only with the maths, which is the same reason a sealed envelope beats a postcard. It works on any file, because it encrypts the raw bytes: a photo, a PDF, a spreadsheet, a video or a ZIP are all treated the same way.
How the encryption works
A password is not used directly as an encryption key, because people pick short, guessable passwords and real keys need to be long and random. Instead the password is run through PBKDF2, a deliberately slow function that mixes it with a random salt and repeats 250,000 times to produce a full 256-bit key. The slowness is the feature: an attacker trying to guess passwords has to do that heavy work for every single guess. The file itself is then encrypted with AES-256-GCM, the Advanced Encryption Standard chosen by the US government and used everywhere from bank websites to phone storage. GCM mode also authenticates the data, so if a single byte of the .enc file is changed or corrupted, decryption fails outright rather than returning a broken file.
Reading the .enc layout
The output is not a container format with headers you need to install anything to read. It is simply the raw bytes laid end to end: the first 16 bytes are the random salt, the next 12 are the random initialisation vector (IV), and everything after that is the AES-GCM ciphertext, which already includes a 16-byte tag that proves the file is intact. A 1 MB file therefore produces an .enc file of about 1 MB plus 28 bytes. Because the salt and IV are fresh random values each time, encrypting the same file twice gives two completely different .enc files, which is correct and stops anyone spotting that two files are the same. Both values are stored inside the output so decryption can read them back and rebuild the key.
When to use it, and when not to
It is a good fit for adding a lock to a sensitive document before it goes into shared storage, sending a file to someone when you can pass the password separately through a different channel, or keeping personal records private on a shared computer. Share the password by voice or a different app, never alongside the .enc file itself. If you only need to protect a short message rather than a file, the AES text encrypter does the same job for text.
The strength of everything here rests on one thing you control: the password. A short or reused password can be guessed no matter how strong the cipher is, so use a long, unique passphrase. And remember there is deliberately no way to recover a lost password: if you forget it, the file is gone for good, so store the password somewhere safe before you rely on the encrypted copy.
How we work it out
AES-256-GCM with a 256-bit key derived from your password by PBKDF2-SHA-256 (250,000 iterations) and a fresh 16-byte random salt, plus a 12-byte random IV. The .enc file is the raw bytes salt (16) + IV (12) + ciphertext; decryption reverses this and fails cleanly if the password is wrong or the file was altered.
Frequently asked questions
Is my file uploaded anywhere?
No. The file is read and encrypted as JavaScript on your own device using the browser's built-in WebCrypto API. It never travels over the internet, nothing is logged or stored, and closing the tab removes everything.
What happens if I forget the password?
The file is unrecoverable. There is no back door and no reset: AES-256 with a proper key-stretching step is designed so guessing the password is infeasible. Store the password somewhere safe, because losing it means losing the file for good.
Does it work for any type of file?
Yes. The tool encrypts the raw bytes, so it treats a photo, PDF, spreadsheet, video or ZIP exactly the same. The output is always a .enc file of the same content, roughly the original size plus 28 bytes for the salt and IV.
How strong is the encryption?
The cipher is AES-256-GCM, the same standard used by banks and governments, and the key comes from your password via 250,000 rounds of PBKDF2-SHA-256 to slow down guessing. The real weak point is the password itself, so use a long, unique passphrase.
Is there a file size limit?
The tool holds the whole file in memory while it works, so very large files can be slow or run out of memory on low-powered devices. For everyday documents, photos and archives it is fine. If a huge file struggles, try it on a device with more memory.