Encrypt File

Pick a file and choose a password to get a locked .enc copy. Pick a .enc file made here and the page switches to Decrypt. The file is read on your device and never uploaded.

How it works

Your password is stretched into a 256-bit key with PBKDF2-HMAC-SHA-256 and 600,000 rounds, using a random salt. The rounds make each password guess slow, which is the main defence against someone trying many passwords.

The file is then encrypted with AES-256-GCM in 1 MiB pieces, each with its own 16-byte check. Working in pieces means a large file is read a part at a time, and the work runs in a background worker so the page stays responsive.

The .enc file starts with a short header: the letters ykencf, a version number, the round count, the salt and a random nonce. That is how the page knows a file is one of its own and switches to Decrypt by itself.

Decrypting checks every piece. If the password is wrong, or a single byte of the file changed, you get an error and no output at all, never a half-decrypted file.

How to use it

  1. 1 Choose the file to lock.
  2. 2 Type a password, then type it again to confirm.
  3. 3 Press Encrypt and wait for the progress bar, then press Download to save the .enc copy.
  4. 4 To open it later, pick the .enc file here, type the same password, press Decrypt and download the original.

Good to know

  • Use a long passphrase of four or more random words. The rounds slow an attacker down, but they cannot save a password like summer2024.
  • Send the .enc file one way and the password another: the file by email, the password by phone or a separate chat.
  • Before you delete the original, decrypt the .enc copy once here to check that you typed the password you think you typed.
  • The name of the .enc file is not encrypted. Rename it first if the name itself gives something away, such as tax-return-2025.pdf.

Browser support

  • Chrome 94 and later
  • Firefox 93 and later
  • Safari 16.4 and later
  • Edge 94 and later

These are the oldest versions with everything the tool uses. They are worked out from the tool itself, so they change when it does.

Version numbers checked on 2026-09-04.

What happens to a 5 MB photo when you encrypt it here

Take a photo of exactly 5,000,000 bytes, named passport.jpg, and the password correct horse battery staple. Pick the file, type the password twice and press Encrypt. The first thing the page does is not encryption at all. It makes 16 random bytes, the salt, and runs the password and salt through PBKDF2 600,000 times. On a recent laptop that takes about half a second, and that delay is the point: anyone guessing passwords pays the same half second for every guess.

Next the photo is cut into 1 MiB pieces of 1,048,576 bytes. Five million bytes makes four full pieces and a fifth of 805,696 bytes. Each piece is encrypted with AES-256-GCM, which adds a 16-byte tag that later proves the piece was not changed. Each piece also gets a different number in its nonce, and the last piece is marked as the last. So nobody can swap two pieces, and nobody can cut the file short and pass it off as complete.

The download is passport.jpg.enc. Its size is easy to work out: a 40-byte header, the 5,000,000 bytes of the photo, and 16 bytes for each of the five pieces. That is 5,000,120 bytes. The header holds the letters ykencf, the version, the round count, the piece size, the salt and the nonce. None of these are secret. They are what any copy of this page needs, along with your password, to rebuild the key and check the pieces.

Now suppose a friend receives passport.jpg.enc and picks it here. The page reads the first six bytes, sees ykencf, and switches to Decrypt by itself. If the friend types the wrong password, the first piece fails its check and the page says Wrong password, and saves nothing. With the right password every piece passes and the download is passport.jpg again, byte for byte the original. If the email had damaged the file in the middle, the first piece would open and the third would fail. The page would then say the password is right but the file is damaged, which tells your friend to ask for a fresh copy rather than try other passwords.

Some limits are worth knowing. The password is the whole of the security, so a short or common one can be guessed on a fast computer no matter how good the cipher is. A lost password cannot be recovered by anyone. The file name and the rough size stay visible: an observer can tell this is a file of about 5 MB called passport.jpg.enc. Files over 2 GB are refused, because the finished copy is held in memory before you save it. And a .enc file only opens here, or with a script written from the format description in the site’s public source code.

Frequently asked questions

What happens if I forget the password?

The file cannot be opened. There is no reset, no recovery email and no master key, because nobody but you ever had the password. This page does not store it, and the site never sees it. Write it down somewhere safe if you need the file in years to come.

Is the file uploaded to encrypt it?

No. The browser reads the file from your disk, a worker on your own device encrypts it with the browser’s built-in Web Crypto, and the result is saved back to your disk. Neither the file nor the password is sent anywhere.

How big a file can I encrypt?

Up to 2 GB. The file is read in 1 MiB pieces, but the finished .enc copy is held in the browser’s memory until you download it. For larger files, a desktop tool such as 7-Zip with AES-256 or age is the better choice.

Can other programs open the .enc file?

Not by double-clicking it. The format is documented in the site’s public source code: PBKDF2-HMAC-SHA-256 for the key, then AES-256-GCM over 1 MiB pieces with a known layout, so a short script with any standard crypto library can decrypt it. The easiest way is this page.

Can I open text from Encrypt Text here?

No. Encrypt Text makes a single line that starts with ykenc1, which you paste back into Encrypt Text. If you pick a saved copy of that line here, the page says so and points you there. Both tools make the key from the password the same way.

Related tools

Your files are processed on your device and are not uploaded. You can verify this in your browser’s developer tools under the Network tab.