Loading...

AES Encryption/Decryption Tool

AES (Advanced Encryption Standard) is the industry-standard symmetric encryption algorithm adopted by the U.S. government and used worldwide. This tool supports AES-128, AES-192, and AES-256 with multiple modes (ECB, CBC, CFB, OFB, CTR), padding schemes, and flexible input/output formats.

Encrypt
Select key size: 16 bytes (AES-128), 24 bytes (AES-192), or 32 bytes (AES-256).
IV must be exactly 16 bytes (AES block size = 128 bits).
Decrypt
Select key size: 16 bytes (AES-128), 24 bytes (AES-192), or 32 bytes (AES-256).
IV must be exactly 16 bytes (AES block size = 128 bits).

About AES Encryption/Decryption Tool

AES (Advanced Encryption Standard), also known as Rijndael, is a symmetric encryption algorithm designed for speed and efficiency. Established as a standard by NIST in 2001, it is the industry-standard encryption algorithm adopted by the U.S. government and used worldwide to protect classified information.

To encrypt data, enter the plain text or password and choose an appropriate AES mode of operation. Each mode offers different security and performance characteristics. ECB is the simplest but least secure. CBC uses an Initialization Vector (IV) to randomize output. CTR turns AES into a stream cipher for high performance. GCM provides both authenticated encryption and high performance, making it the recommended mode for modern applications and APIs.

Block-based modes like ECB and CBC require padding (such as PKCS5Padding) to align data to the 16-byte AES block size. Streaming modes like AES-GCM do not require padding.

AES always uses a 128-bit block size. When an IV is required, it must be exactly 16 bytes (128 bits) long. Secret key sizes must be 16, 24, or 32 bytes for AES-128, AES-192, and AES-256 respectively.

AES is a symmetric cipher, meaning the same secret key is used for both encryption and decryption. In practice, AES is often used together with asymmetric encryption like RSA, where RSA secures the AES secret key and AES encrypts the actual data.

Applications of AES include encrypting sensitive files and database fields, securing HTTPS/TLS communications, and API payload encryption.

Key features

  • Symmetric Key Algorithm The same secret key is used for both encryption and decryption - making AES fast and efficient for bulk data.
  • Block Cipher AES operates on fixed-size blocks of 128 bits. Data is divided into 16-byte chunks before encryption.
  • Cipher Modes AES supports ECB, CBC, CTR & GCM modes. AES-GCM is recommended for authenticated encryption.
  • Flexible Key Sizes Supports 128-bit, 192-bit, and 256-bit encryption. AES-256 is trusted by governments and enterprises for high-security data.
  • Secret Key Formats Secret Key must be provided in Hex, Base64, or Plain Text. Key length must strictly match the selected key size (e.g. 16 bytes for AES-128).
  • IV Formats IV can be Hex, Base64, or Plain Text, and must be exactly 16 bytes (128-bit). A random IV is strongly recommended.

How to Use This AES Encryption Tool

  1. Input data: Enter your plain text in the Encrypt panel, or your ciphertext in the Decrypt panel.
  2. Select mode and key size: Choose a cipher mode (GCM is recommended) and select a key size (AES-128, AES-192, or AES-256).
  3. Provide a secret key: Enter or generate a secret key. Keep this key safe - it is required for decryption.
  4. Provide an IV: Enter or generate an IV (not needed for ECB mode). Use a random IV for each encryption.
  5. Execute: Click Encrypt or Decrypt and copy the output.

Usage tips

  • Secure Usage Guidelines: Prefer AES-GCM for modern applications - it provides encryption and authentication in one operation.
  • Never use AES-ECB for real data - it reveals patterns in identical plaintext blocks.
  • Always use a random, unique IV for every encryption operation for CBC/CFB/GCM modes and never reuse an IV with the same key.
  • Never reuse encryption keys or IVs across different systems or purposes.
  • When NOT to Use AES: AES is reversible encryption and should never be used to store passwords. Use bcrypt, scrypt, or Argon2 instead.
  • When NOT to Use AES: AES is not suitable for digital signatures or secure key exchange. Use RSA or elliptic-curve cryptography for these use cases.
  • Error - Wrong AES Mode Selected: Using insecure or incorrect AES modes is a common cause of weak encryption. Fix: Use AES-GCM for authenticated encryption.
  • Error - Invalid IV Length: AES requires a 16-byte IV for block modes like CBC. Fix: Always generate a random 16-byte IV for each encryption.
  • Error - Authentication Tag Verification Failed (AES-GCM): Fix: Ensure the same key, IV, and associated data are used for both encryption and decryption.
  • Error - Padding Errors (PKCS5Padding): Fix: Ensure the same padding scheme is used on both sides, or switch to AES-GCM to avoid padding-based modes entirely.
  • Using a plain-text password directly as an encryption key is not recommended. For stronger security, derive a key from your password using PBKDF2.

Frequently asked questions

Yes. AES is considered highly secure when used with strong keys and modern modes like AES-GCM. AES-256 is widely trusted by governments and enterprises.
No. Passwords should be hashed using slow, memory-hard algorithms such as bcrypt, scrypt, or Argon2 instead of reversible encryption.
AES-GCM is the recommended choice as it provides encryption and authentication in a single, efficient operation.
AES-128 uses a 128-bit key, while AES-256 uses a 256-bit key. AES-256 offers higher security, but AES-128 is faster and still very secure for most applications.
Yes, AES-GCM requires a unique IV (usually 12 bytes/96 bits) for every encryption operation with the same key to ensure security.