Skip to content
ZeroServer.tools

AES Encryption Tool

Encrypt and decrypt text with AES-GCM and a password.

Ciphertext (Base64)

About AES-GCM encryption

This tool derives a 256-bit key from your password with PBKDF2 (150,000 iterations, SHA-256) and a random salt, then encrypts with AES-GCM — an authenticated cipher that detects tampering. The output packs the random salt, the initialization vector, and the ciphertext into one Base64 string, so decryption only needs that string and the password. Everything happens in your browser via the Web Crypto API; no keys or data are transmitted. Strong passwords matter — the security rests entirely on yours.

Built and maintained by Meet Shah · Last updated

What this tool is used for

  • Protecting a short note or a credential before putting it somewhere you do not fully control.
  • Demonstrating authenticated encryption and what happens to the output when one bit of ciphertext changes.
  • Producing an encrypted fixture for testing a decryption path.
  • Checking that a password-derived key round-trips the way your implementation expects.
  • Encrypting something you will decrypt yourself later, where key management is a single person's problem.

Frequently Asked Questions

Which mode should I use, and why does it matter so much?
GCM, which is authenticated — it detects tampering as well as hiding content. ECB must never be used: it encrypts identical blocks identically, so patterns survive. The famous 'ECB penguin' image is still recognisable after encryption.
What is an IV and can I reuse one?
An initialisation vector randomises the ciphertext so the same plaintext encrypts differently each time. In GCM, reusing an IV with the same key is CATASTROPHIC — it leaks the XOR of the plaintexts and can expose the authentication key itself.
Is a password the same as a key?
No, and conflating them is the usual mistake. AES-256 needs 32 random bytes; a password must be stretched into one with a KDF such as PBKDF2, scrypt or Argon2, using a salt and a high iteration count. Hashing it once with SHA-256 is not enough.
Is AES-256 meaningfully stronger than AES-128?
Both are unbroken and 128-bit security is already beyond brute force. AES-256 uses 14 rounds against 10 and is required by some compliance regimes; in practice key management, mode choice and IV handling matter far more than the key size.
Does encryption happen in my browser?
Yes — it uses the Web Crypto API locally and nothing is transmitted. That is essential for a tool like this: pasting a real secret into a server-side encryptor would hand the plaintext to whoever runs it.
Does encryption alone prove the message was not tampered with?
No. Older modes such as CBC encrypt without authenticating, so an attacker can flip bits in the ciphertext and change the decrypted result. GCM and other AEAD modes add a tag that fails loudly, which is why they are the modern default.

Common errors and gotchas

  • Reusing an IV with the same key. Under GCM this is catastrophic and can expose the keystream, not merely leak equality.
  • Treating a password as a key. A password needs a key derivation function with a salt and a real iteration count first.
  • Choosing a mode without authentication and then being surprised that ciphertext can be modified undetected.
  • Assuming AES-256 fixes a weak password. The password is the weak link, and doubling the key size does not touch it.
  • Losing the salt or IV. They are not secret but they are required, and without them the ciphertext is unrecoverable.

Related Cryptography & Security tools

Private & free — this tool runs entirely in your browser.

IndieKitShip your Next.js startup in days.affiliate