How to password-protect a file with AES-256

Updated 2026-06-21

To password-protect a file, encrypt it with AES-256-GCM using a passphrase: choose the file, type a strong password, and you get back a scrambled file that only the same password can unlock. With the File & Text Encryptor the whole process happens inside your browser tab, so the file and the password are never uploaded anywhere.

Encrypt a file or some text

  1. Open the File & Text Encryptor and choose Encrypt.
  2. Drop in a file — or paste the text you want to protect.
  3. Type a passphrase. This is the only thing that can decrypt the result, so make it strong and memorable.
  4. Run the encryption. You get back an encrypted blob to download (or copy, for text). The original stays untouched.

Under the hood this uses AES-256-GCM, the same authenticated cipher trusted for everything from disk encryption to TLS. "Authenticated" matters: GCM doesn't just scramble the data, it also detects tampering. If a single byte of the encrypted file is changed or corrupted, decryption fails loudly instead of returning garbage.

Decrypt it later

Decryption is the same flow in reverse:

  1. Switch to Decrypt.
  2. Load the encrypted file (or paste the encrypted text).
  3. Enter the exact passphrase used to encrypt it.
  4. Get your original file or text back.

There is no "forgot password" link and no backdoor — that is the whole point of real encryption. If the passphrase is wrong, even by one character, you get nothing. Store the password somewhere safe, like a password manager, before you close the tab.

Choose a passphrase that actually protects you

AES-256 is effectively unbreakable by brute force, which means your passphrase is the weak link, not the cipher. A short or common password can be guessed offline no matter how strong the algorithm is. Good practice:

Why doing this in the browser matters

Most "encrypt a file online" services upload your file to a server to do the work — which means you have to trust them with the very thing you are trying to protect. This tool runs entirely client-side. The encryption keys are derived in your tab and never leave it, nothing is sent over the network, and you can even disconnect from the internet before encrypting. That makes it safe for genuinely sensitive material: tax documents, recovery codes, contracts, private notes.

Ready to lock something down? Open the File & Text Encryptor and protect your first file in a few seconds.

Try the File & Text Encryptor →