DevGizmo

AES Encrypt & Decrypt

Encrypt and decrypt text using AES-GCM or AES-CBC with 128, 192 or 256-bit keys derived from a password.

About AES Encryption

AES (Advanced Encryption Standard) is the most widely used symmetric encryption algorithm in the world. It is approved by NIST, mandated for US government data, and is the cipher behind HTTPS, WPA2 Wi-Fi, file archive encryption, and countless application-layer security protocols.

This tool uses the browser's built-in Web Crypto API — your data is never sent to a server. A random 16-byte salt and a random IV are generated for every encryption operation, and the key is derived from your password using PBKDF2 with SHA-256 and 100,000 iterations, providing strong resistance against brute-force attacks.

AES-GCM vs AES-CBC

  • AES-GCM (Galois/Counter Mode) — the recommended default. GCM is an authenticated encryption mode: it guarantees both confidentiality and integrity. Any tampering with the ciphertext will cause decryption to fail, protecting against active attackers. Uses a 12-byte IV.
  • AES-CBC (Cipher Block Chaining) — a widely supported classic mode offering confidentiality only (no built-in integrity check). Choose CBC when interoperability with older systems is required. Uses a 16-byte IV.

Key Sizes

AES supports three key sizes: 128-bit, 192-bit, and 256-bit. All three are considered computationally infeasible to brute-force with current technology. AES-256 is the standard choice for highest-security applications. The key is never typed directly — it is derived from your password using PBKDF2, so the strength of your password matters.

Important Notes

The ciphertext produced by this tool includes the salt and IV prepended before the encrypted data, all base64-encoded into a single string. You must use the same mode and key size to decrypt as were used to encrypt. This tool is intended for learning and low-stakes use cases — for production systems handling sensitive data, use a well-audited cryptography library in your application stack.