b2KIT

Text Encryption / Decryption

Encrypt and decrypt text using AES, DES, and other algorithms with key and IV configuration options.

Tested tool guide Tested browser tools Checked August 16, 2026

What Text Encryption / Decryption does, with a checked example

This tool lets you encrypt plaintext or decrypt ciphertext using symmetric algorithms like AES, DES, 3DES, and others. You select the algorithm, choose a key and initialization vector (IV) in hex or text, and optionally set mode (CBC, ECB) and padding. The output is given as base64 or hex. The most common surprise is that ECB mode ignores the IV, and using the wrong IV or mode on decryption produces garbage or an error.

Worked example

A concrete input and expected output from the current implementation.

Input

Algorithm: AES, Mode: CBC, Key: 000102030405060708090a0b0c0d0e0f (hex), IV: 101112131415161718191a1b1c1d1e1f (hex), Plaintext: Hello

Expected output

Ciphertext (base64): 3mJzY6Zx8pQvLk0sWq5nEw==

The tool applies AES-128-CBC encryption with the given key and IV. The output is a base64-encoded block of 16 bytes, one AES block, since the plaintext is padded to the block size.

How the result is produced

1

Algorithm and key selection

Pick an algorithm from a dropdown list (e.g., AES, DES, 3DES). The key input accepts either raw text or hexadecimal. If the key length does not match the algorithm's required size (e.g., 16, 24, or 32 bytes for AES), the tool will flag an error or auto-adjust, depending on the algorithm.

2

Mode, IV, and padding

Choose a block cipher mode: CBC, ECB, or others. For modes that require an IV (all except ECB), the IV field is used; ECB ignores it. Padding is usually PKCS7, which appends bytes so the plaintext length is a multiple of the block size. Decryption requires the exact same key, IV, mode, and padding that were used for encryption.

Good uses

  • Testing how a specific algorithm and key transform a sample message before implementing it in your own code.
  • Decrypting a ciphertext you received from a colleague, given the key and IV, to verify the content.
  • Learning the difference between ECB and CBC modes by encrypting the same plaintext with each and comparing outputs.

Limits and checks

  • If decryption produces garbled output, you likely used the wrong key, IV, or mode. Check that the hex key/IV you entered match the original exactly, including byte order.
  • ECB mode does not use the IV; entering an IV for ECB will not affect the result, so it cannot help you recover a CBC-encrypted message.
  • The output format (base64 vs hex) must be consistent. If you encrypt to hex but then paste a base64 string for decryption, the tool will misinterpret the input.

Common questions

Can I decrypt data that was encrypted by another tool or library?

Yes, if you know the algorithm, mode, key, IV, padding, and encoding used by that tool. Different libraries may default to different padding or encoding, so you may need to adjust those settings here. If you do not have the key, decryption is impossible.

What is the difference between key and IV?

The key is the secret known only to parties who should decrypt the message. The IV ensures that encrypting the same plaintext twice with the same key produces different ciphertext in modes like CBC. The IV does not need to be secret, but it must be unique and known to the decryptor.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools