AES-128 · 16-byte keys

AES-128 encryption and decryption

AES-128 uses a 16-byte key: 16 characters of text, 32 hex digits or 24 Base64 characters. It is the default in many tutorials, Android apps and older Java code, and it is still considered secure. Enter your key and IV, pick the mode and padding, and compare the result with what your program prints.

How to use the tool

  1. 1

    Enter a 16-byte key

    Type 16 characters like 1234567890123456, or paste 32 hex digits and switch the format to Hex.

  2. 2

    Pick CBC or GCM

    CBC with PKCS5Padding is the usual pairing in Java examples. GCM is the better choice for new code.

  3. 3

    Add the IV

    Enter the 16-byte IV your code uses (12 bytes for GCM), or leave it empty to test with zeros.

  4. 4

    Encrypt and compare

    Encrypt a sample text and check it against your program’s Base64 or Hex output.

QRScanKaro

Just need to lock a message?

Text Encryption is simpler: pick a password and share the result. No keys, IVs or modes to set.

Encrypt with a password →

Frequently asked questions

Is AES-128 secure enough?

Yes, for almost everything. No practical attack on AES-128 is known, and 2^128 keys can’t be searched. AES-256 adds a margin against future quantum computers, which is why some standards require it.

My key is a password like “secret”. Can I use it?

Not directly. AES-128 needs exactly 16 bytes, and this tool never pads or cuts your key, because silent padding is a common source of mismatches. Either use a 16-byte key or derive one from the password with PBKDF2, as the Text Encryption tool does.

How do I get a 16-byte key in code?

Use a secure random generator: SecureRandom in Java, crypto.randomBytes(16) in Node, or get_random_bytes(16) in Python. Store it as Base64 or Hex, and decode it back to bytes before use.

Why is AES-128 output the same length as AES-256?

The key size changes only the number of rounds (10 for AES-128, 14 for AES-256). The block is always 16 bytes, so the ciphertext length depends on the text, mode and padding, not on the key.