← All tools
// Security

AES Cipher online

Securely encrypt and decrypt text with AES-128 or AES-256.

AES Encrypt & Decrypt logo
by
CHUNKY
MUNSTER
// Encrypted Output
Output will appear here...
// All encryption runs locally. No data is sent to any server. Uses CryptoJS - suitable for testing but use a server-side library in production. CBC mode requires a random IV for production use.

How to Use the AES Cipher

  1. Choose Encrypt or Decrypt mode.
  2. Select key size (AES-256 for maximum security, AES-128 for speed) and cipher mode (CBC recommended for most uses).
  3. Enter your passphrase - this is the shared secret both sides need.
  4. Paste your plaintext (to encrypt) or ciphertext (to decrypt) and click Run.
  5. Use Swap to flip the output back into the input for round-trip testing.

This AES Cipher encrypts and decrypts text entirely in your browser using CryptoJS - nothing is ever sent to a server. It supports AES-128 and AES-256 with four block cipher modes: CBC, ECB, CTR, and OFB. Output can be Base64 (compact, URL-safe) or hexadecimal (easier to inspect and copy into code).

Choosing the Right Mode

Frequently Asked Questions

What is AES encryption?

AES (Advanced Encryption Standard) is the world's most widely used symmetric cipher. It encrypts data in 128-bit blocks using a 128-bit or 256-bit key. AES-256 is approved for top-secret use by the US government and is considered secure against all known attacks.

Is this tool safe to use with real passwords or secrets?

For learning, testing, and non-critical data - yes. For production systems storing real user secrets, use a server-side library (Python's cryptography, Node's crypto module) with a properly generated random IV and key derivation (PBKDF2 or Argon2). This tool uses a passphrase directly as the key, which is less secure than a derived key.

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

AES-128 uses a 128-bit key and 10 encryption rounds; AES-256 uses a 256-bit key and 14 rounds. Both are considered cryptographically secure - AES-256 provides a larger security margin against brute force, at a small performance cost.

Why does decryption produce "(empty or wrong key)"?

The passphrase used for decryption must exactly match the one used for encryption - including case and any trailing spaces. The cipher mode must also match. If you encrypted with CBC and try to decrypt with ECB, decryption will fail silently or produce garbage.

Use this AES Cipher alongside our other crypto tools - Hash Calculator, Base64 Encoder, and ROT13 - for complete browser-side cryptography.

This AES Cipher follows đŸ“– Reference: NIST FIPS 197 - Advanced Encryption Standard (AES)