Loading AES-CBC Tool...

How to Use AES-CBC Encrypt/Decrypt Tool

Use fixed CBC mode encryption/decryption for compatibility workflows and structured key/IV handling.

Step 1

Choose Encrypt or Decrypt

Select the operation in the middle panel. CBC mode is commonly used for compatibility flows and legacy integrations defined in NIST SP 800-38A:

Use Encrypt for plaintext input.
Use Decrypt for Base64 ciphertext input.
Cipher mode is fixed to CBC.

Example: Plaintext

{"txn":"TRX-901","amount":250.75,"currency":"USD"}
Step 2

Set Key and IV

Provide hex key and IV values or use the regenerate control. Generate random values with crypto.getRandomValues and ensure lengths match the selected AES mode.

AES-128 key length: 32 hex chars.
AES-256 key length: 64 hex chars.
IV length: 32 hex chars (16 bytes).

Example: AES-256 Key/IV

key(hex): 4a1f80f6bd8a47de57c2f695f9f9329e65c2289b8cdf8a5df3d0579f3a5a6bf1
iv(hex):  6c85aab3533cb306a9fd35a0c7606f87
Step 3

Copy or Download Result

Use the right panel output for API calls, config values, or secure transfer.

Copy output directly to clipboard.
Download output as `.txt` file.
For generic AES tools, use AES Encryption and AES Decryption.
Step 4

Validate CBC Output

Keep the mode, IV, and key metadata with ciphertext. Base64 handling should follow RFC 4648 and storage should follow OWASP guidance.

Example: CBC Ciphertext

xntD9F6cJ0vYqYv4sVBV4fSyL+uYV4X+gUZSu1C2j9jYg0N3Ww==

Frequently Asked Questions

When should I use AES-CBC?

AES-CBC is useful when you need compatibility with systems that specifically require CBC mode.

Is this tool browser-side?

Yes. Encryption and decryption run in your browser using Web Crypto APIs.

Why does decryption fail?

AES-CBC decryption fails if key, IV, AES mode, or ciphertext does not match exactly.

Can I use generated key/IV from this page elsewhere?

Yes. You can use the same key/IV values in your backend services or other cryptography tools that support AES-CBC.