AES Encryption

Encrypt text, files, or URL content online with AES using CBC, CTR, CFB, OFB, ECB, or GCM, configurable padding, PBKDF2, EvpKDF, or HKDF. Read more

AES encryption online

AES is a symmetric block cipher standardized by NIST FIPS 197. The same secret key is needed to encrypt and decrypt data. This tool supports AES-128, AES-192, and AES-256 with text, local file, or URL input.

You can select CBC, CTR, CFB, OFB, ECB, or GCM mode, configure padding where applicable, and use either a direct key or KDF-derived key material. The recipient must know every required parameter, not just the secret input, to reproduce the decryption.

How to encrypt with AES

  1. Select text, file, or URL input and the appropriate input encoding.
  2. Choose the AES key size and mode required by the receiving system.
  3. Enter a direct key and IV, or select a KDF and enter its required secret input.
  4. Configure padding, salt, hash, and KDF-specific settings such as iterations or info.
  5. For GCM, supply a nonce in the GCM settings, configure the authentication tag, and add optional additional authenticated data (AAD). KDF-derived GCM still requires this nonce because it is not derived from the KDF.
  6. Encrypt and save both the ciphertext and all non-secret parameters needed for decryption.

The key, passphrase, or input keying material must remain secret. An IV, nonce, salt, info value, and authentication tag normally do not need to be secret, but they must be generated and stored according to the selected scheme.

Choosing an AES mode

  • GCM provides authenticated encryption: it detects modifications when the authentication tag is verified. Never reuse a GCM nonce or IV with the same key.
  • CBC requires an appropriate IV and separate authentication when integrity matters.
  • CTR, CFB, and OFB turn the block cipher into stream-like operation and require correct IV or counter handling.
  • ECB encrypts equal blocks identically and reveals patterns. It is generally unsuitable for structured or multi-block data.

Do not invent a new cryptographic format from individual options unless you understand how its keys, nonces, authentication, and serialization will be managed. Prefer a well-specified interoperable format when one is available.

AES key and KDF compatibility

A direct AES key must have the exact length required by AES-128, AES-192, or AES-256. A human passphrase is not automatically an AES key; PBKDF2 and EvpKDF derive key material from passphrases, while HKDF derives key material from input keying material such as a shared secret. The selected KDF parameters, salt, hash, iterations, or info must match.

Two tools given the same secret input can still produce different ciphertext when their KDF, salt, info, IV, mode, padding, or output format differs.

Use the standalone PBKDF2, EvpKDF, or HKDF tools when you need to inspect the derived bytes separately. This AES tool derives enough material for the selected AES key size. For CBC, CFB, CTR, and OFB KDF modes, the IV is also derived from the KDF output. GCM KDF mode derives only the key and still requires an explicit nonce.

AES encryption FAQ

Why does encryption produce a different result each time?

Secure schemes commonly use a fresh random salt, IV, or nonce. Different ciphertext for the same plaintext can therefore be expected, provided the parameters needed for decryption are retained.

Is Base64 ciphertext encryption?

Base64 and Hex are output encodings for encrypted bytes. They do not add security and can be converted without knowing the AES key.

How do I decrypt the result?

Use the AES Decryption tool with matching key size, mode, key derivation, salt, IV, padding, tag, AAD, and input encoding.

Input
Output
Share Link
Settings