AES Encrypt & Decrypt

Browser-based AES-256-GCM encryption — no data leaves your browser

Mode
How it works: Uses the Web Crypto API built into your browser. Key derivation: PBKDF2 with SHA-256 (100,000 iterations). Encryption: AES-256-GCM with a random 96-bit IV. Output format: base64(salt[16] + iv[12] + ciphertext). All processing happens locally — no network requests.

What is AES Encryption Tool?

AES Encryption Tool encrypts and decrypts text using AES (Advanced Encryption Standard) directly in your browser. Select AES-128, AES-192, or AES-256 key sizes, choose a cipher mode (CBC or GCM), enter a passphrase, and encrypt or decrypt any text. All cryptographic operations use the browser's Web Crypto API — your data and keys never leave your device.

AES is the symmetric encryption standard approved by NIST in 2001 and used in virtually every secure system: HTTPS/TLS, VPNs, disk encryption (FileVault, BitLocker), and secure messaging. AES-256 provides the highest security and is used by governments for classified data. Symmetric encryption means the same key encrypts and decrypts — unlike asymmetric encryption (RSA) which uses key pairs.

Cipher mode matters for security: ECB mode is insecure because identical plaintext blocks produce identical ciphertext (revealing patterns). CBC adds an initialization vector to randomize each block. GCM (Galois/Counter Mode) adds authentication — it detects any tampering with the ciphertext and rejects modified data. GCM is the recommended mode for new applications.

How to Use

  1. Enter the text to encrypt in the plaintext field.
  2. Enter a passphrase — it is hashed via PBKDF2 to derive the AES key. Use a long, random passphrase.
  3. Select AES-256-GCM for maximum security (authenticated encryption preventing tampering).
  4. Click Encrypt to get the base64-encoded ciphertext, which includes the IV and salt.
  5. To decrypt, paste the ciphertext back, enter the same passphrase, and click Decrypt.

Examples

Encrypt a private note

Result: Passphrase + plaintext 'API key: sk-xxxx' → base64 ciphertext that only the same passphrase can decrypt

AES-256-GCM with authentication tag

Result: GCM mode appends an authentication tag — decryption fails if ciphertext was modified, proving integrity

PBKDF2 key derivation

Result: 100,000 iterations of PBKDF2 with a random salt derives the AES key from your passphrase — makes brute-force attacks computationally expensive

Frequently Asked Questions

What is the difference between AES-128 and AES-256?

The number is the key length in bits. AES-256 uses a 256-bit key and provides more security margin. AES-128 is still considered secure and is faster. For most purposes AES-128 is sufficient; AES-256 is recommended for high-security or compliance requirements.

What is an Initialization Vector (IV)?

An IV is a random value combined with the key at the start of encryption to ensure that identical plaintext encrypted twice produces different ciphertext. The IV does not need to be secret but must be unique per encryption. This tool generates a random IV automatically.

What is the difference between CBC and GCM?

AES-CBC encrypts data but does not authenticate it — an attacker can modify ciphertext without detection. AES-GCM adds authenticated encryption — any modification to the ciphertext or associated data causes decryption to fail with an error. Use GCM for new applications.

Is this tool safe for production use?

This tool is suitable for learning and low-stakes encryption. Production systems should use dedicated key management services (AWS KMS, HashiCorp Vault) with key rotation, secure storage, and audit logging. Never hard-code encryption keys in source code.

What is PBKDF2?

Password-Based Key Derivation Function 2 derives a cryptographic key from a passphrase using a random salt and many hash iterations. The iterations make brute-force attacks slow — testing a large password list takes much longer compared to a simple hash.

Related Tools