Lock a message or a file with a password
Sometimes you need to send something private by email or chat, keep a note of passwords or codes in a shared folder, or store a document on a USB stick that might get lost. This tool encrypts text or any file with a password, using the same strong encryption that banks and messaging apps use. The result is unreadable to anyone without the password, and you can unlock it again here, on any device, with that password.
Everything happens in your browser, using its built-in cryptography. The text, the file and the password are never uploaded, and the page works offline once it has loaded.
How to use it
- Choose Text or File.
- Paste the text or choose the file you want to protect.
- Type a strong password and press Encrypt. Text becomes a block of letters starting with AIO1:, which you can copy into an email or a note. A file is downloaded as a new file ending in .locked.
- Send the password a different way. If you email the locked message, tell the person the password by phone or text message, not in the same email.
- To unlock, paste the locked text or choose the .locked file, type the password and press Decrypt.
How it works
Your password is turned into a 256-bit key with PBKDF2 using SHA-256 and 600,000 rounds, together with a random salt, so the same password gives a different key every time and guessing passwords is slow. The data is then encrypted with AES-256 in GCM mode, which also detects any change: if a single character of the locked text is altered, or the password is wrong, decryption fails instead of giving garbage. The salt and the starting value (IV) are stored with the result, which is why the locked text is a little longer than the original.
Good to know
- There is no way to recover a forgotten password. Not here, not anywhere. That is what makes it secure. Keep the password somewhere safe, such as a password manager.
- The password is the weak point. A short or common password can be guessed, however strong the encryption. Use at least 12 characters, or four or five random words.
- File names: the original file name is stored inside the locked file and restored when it is unlocked.
- Large files are held in memory while they are encrypted, so very large files depend on your device. A few hundred megabytes is fine on most computers.
How this tool was tested
Before publishing, I ran 29 automated checks on the finished page in Microsoft Edge, which is built on Chromium like Chrome. Last full run: 15 November 2026.
- Locking and unlocking: text and files come back exactly, the wrong password fails with a clear message instead of garbage, changing a single byte of the locked data is detected, and the same text locks differently every time because of the random salt and IV.
- The format was checked independently: locked text was decrypted with the browser's Web Crypto functions directly, following the format described on this page, without using the tool's own unlock code.
- Unicode and size: accented letters, symbols and emoji in the text and the password (including the same accent typed two different ways), 40 random files byte for byte with their names, and a 20 MB file.
- Using the tool: the password length rule and strength meter, encrypting with the full 600,000 rounds, decrypting, a wrong password, locking and unlocking a file with its name restored, and a file that was never locked.
What the tests did not cover: Safari and Firefox were not tested. Very large files (several hundred megabytes) depend on your device's memory and were not tested. The bulk tests used fewer rounds for speed; the page always uses 600,000. Something not working? Tell me on the contact page.
FAQ
Can you see what I encrypt?
No. Nothing is sent anywhere; the encryption runs in your browser with its built-in Web Crypto functions.
Can other programs open the locked file?
The format is standard AES-GCM with PBKDF2, documented in the page code, but it is easiest to unlock it here. For whole folders, an encrypted zip from 7-Zip or your system's own encryption may suit better.
Is this safe enough for sensitive data?
The encryption itself is the industry standard. For legal or regulated data, follow your organisation's rules on approved tools.