← All text tools

AES Encrypt and Decrypt with Key and IV

Encrypt or decrypt with AES-128, 192 or 256 using your own key and IV in CBC, CTR, GCM or ECB mode, with padding choices and hex, Base64 or text input and output.

  • Free
  • No sign-up
  • Works on any device

About AES Encrypt and Decrypt with Key and IV

Most online AES tools derive a key from a password. This one exposes the raw parts so you can reproduce what another system does: you type the key, the IV or nonce, pick CBC, CTR, GCM or ECB, choose PKCS#7, zero or no padding, and read the result in hex or Base64. It implements AES from the standard (FIPS 197) and the modes of NIST SP 800-38A and 800-38D, so published test vectors give the published answers. Use it to debug an integration, check a library, or learn how modes differ.

How to use AES Encrypt and Decrypt with Key and IV

  1. Choose encrypt or decrypt, the mode and the padding, then enter the key and the IV with their formats.
  2. Paste the plaintext, or the ciphertext in hex or Base64, and pick the output format.
  3. Copy the result, or press the random buttons to make a fresh 256-bit key or IV and compare with your own code.

Why use this tool?

Also known as

Frequently asked questions

Which mode should I choose?

GCM is the best default because it also detects tampering. CBC with a random IV and CTR are fine when authentication is added separately. ECB reveals patterns and is only for compatibility.

Why do I get a padding error when decrypting?

Usually the key, IV or mode is wrong, so the last block decrypts to garbage. The ciphertext may also have been cut or changed, or a different padding scheme was used to encrypt.

Can I reuse the same IV with the same key?

Never for CTR or GCM, where reuse breaks the security completely. For CBC the IV should be unpredictable and fresh for every message. Make a new random IV each time.

Is AES Encrypt and Decrypt with Key and IV free?

Yes. AES Encrypt and Decrypt with Key and IV on Toolipedia is free to use, with no sign-up and no watermark.

Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.