All Tools

Encryption Tool: AES, DES, Triple DES, RC4 Online

Encrypt and decrypt text with AES (GCM, CBC, CTR, CFB, ECB), DES, Triple DES, Speck, RC4 or XXTEA, using an OpenSSL-compatible passphrase or a raw key and IV. Base64 or hex output. Nothing is uploaded.

Direction
Ciphertext format
Cipher
Key type

Key and IV are derived with PBKDF2-HMAC-SHA256 (10,000 iterations), as openssl enc -pbkdf2 does.

0 characters, 0 bytes

0 characters, 0 bytes


About the Encryption Tool

The Encryption Tool encrypts text and decrypts ciphertext with the common symmetric ciphers: AES (ECB, CBC, CTR, CFB and GCM modes), DES, Triple DES, Speck, RC4 and XXTEA. Encryption takes UTF-8 text and gives Base64 or hex; decryption takes Base64 or hex and gives the text back. You can use a passphrase, in the same format as openssl enc -pbkdf2, or enter a raw key and IV in hex or as text. Everything runs in your browser: your text, passphrases and keys are never uploaded.

How to use it

Steps

  1. Choose Encrypt or Decrypt, then the cipher. The page opens on AES with a 256-bit key in CBC mode, the combination most OpenSSL scripts use.
  2. Pick the mode and, for a passphrase, the key size. Speck has a Variant list for its block and key sizes.
  3. Under Key type, keep Passphrase and type one, or choose Key and IV and enter them. Generate key and Generate IV fill in random hex of the right length.
  4. Type or paste the input. The output updates as you go; Swap moves it into the input and reverses the direction, a quick way to check a round trip.
  5. Choose Base64 or Hex under Ciphertext format for the encrypted side.

Privacy

Encryption and decryption happen entirely on your device. Nothing is uploaded, nothing is logged, and nothing is kept once you close or reload the tab. Even so, treat a page as a convenience: do not paste production secrets into any website you have not audited.

Which cipher to use

New work: AES-GCM

For anything new, use AES-GCM. It is fast, standard (NIST SP 800-38D) and authenticated: if a single byte of the ciphertext or the tag is changed, decryption fails instead of returning altered text. Never reuse a key and nonce pair; with a passphrase this page draws a fresh random salt every time, so the derived key and nonce never repeat. CBC, CTR and CFB give confidentiality only and ECB leaks patterns between identical blocks, so use them to match an existing system.

Legacy interoperability only

DES, RC4 and XXTEA are here for interoperability with old systems and for learning, not for protecting data. DES has a 56-bit key that can be searched exhaustively in hours. RC4 has biased keystream bytes and is banned from TLS (RFC 7465). XXTEA has published chosen-plaintext attacks. Triple DES is retired by NIST for new encryption since 2023 because of its 64-bit block. Speck is a lightweight cipher from the NSA that was not adopted by ISO; it is included for embedded and research work.

The passphrase format

With Passphrase, the output is the OpenSSL enc container: the eight bytes Salted__, an 8-byte random salt, then the ciphertext. Key and IV are derived together with PBKDF2-HMAC-SHA256 over 10,000 iterations, which is what OpenSSL uses with -pbkdf2. That is why a Base64 result always begins with U2FsdGVkX1. Save the output as message.b64 and decrypt it on any machine with:

openssl enc -d -aes-256-cbc -pbkdf2 -base64 -A -in message.b64 -pass pass:YOUR-PASSPHRASE

Swap -aes-256-cbc for the cipher you used, for example -aes-128-ctr, -des-ede3-cbc or -rc4 (single DES and RC4 need -provider legacy -provider default on OpenSSL 3). OpenSSL's enc command does not support GCM, so a GCM passphrase output decrypts here but not with that command. Speck and XXTEA are not in OpenSSL at all; the same container is used for them.

Raw keys and IVs

Lengths

AES takes a 16-, 24- or 32-byte key and picks AES-128, AES-192 or AES-256 from it. DES needs 8 bytes, Triple DES 16 or 24, Speck the key size of its variant, RC4 1 to 256 bytes and XXTEA up to 16 bytes, padded with zeros. CBC and CFB use one block of IV (16 bytes for AES, 8 for DES), CTR a 16-byte counter block, and GCM a 12-byte nonce, with the 16-byte tag appended to the ciphertext. ECB, RC4 and XXTEA use no IV, so the field is hidden. A wrong length is reported with the length expected.

Conventions

Block modes use PKCS#7 padding, as OpenSSL does. Speck reads every word little-endian, the block as y then x and the key as k0, l0, l1 and so on, the convention of the designers' implementation guide. XXTEA follows the byte layout of Ma Bingyao's xxtea libraries, which store the plaintext length in an extra last word, so their output decrypts here and the other way round.

When decryption fails

A wrong passphrase or key, a damaged ciphertext or a changed GCM tag gives a plain message instead of garbage. If the key is right but the plaintext was not text, the bytes are shown as hex with a note. Base64 or hex that cannot be read is reported with the position of the first bad character.

Related tools

To encode bytes without a key, use the Base64 Encoder or Text to Hex. To check that a file or message is unchanged, compute its digest with the Hash Generator. For a strong passphrase, use the Password Generator. Go straight to AES encryption if that is all you need.

Open-source credits

  • AES and its modes come from @noble/ciphers by Paul Miller, MIT licence.
  • PBKDF2 and random salts, keys and IVs come from the browser's built-in Web Cryptography API.
  • DES follows FIPS 46-3 and Triple DES NIST SP 800-67; Speck follows Beaulieu et al., "The SIMON and SPECK Families of Lightweight Block Ciphers" (2013); RC4 is checked against RFC 6229; XXTEA follows Wheeler and Needham, "Correction to xtea" (1998). These are implemented on this site and tested against the published vectors.

Frequently asked questions

Which cipher and mode should I choose?

For new work, AES-256 in GCM mode. It is standard, fast and authenticated, so changed ciphertext fails to decrypt instead of producing altered text. Choose CBC, CTR, CFB or ECB only to match an existing system. DES, RC4 and XXTEA are offered for legacy interoperability only and should not protect new data.

Can I decrypt the passphrase output with OpenSSL?

Yes, for every cipher OpenSSL's enc command supports. Save the Base64 output to a file and run openssl enc -d -aes-256-cbc -pbkdf2 -base64 -A -in message.b64 -pass pass:YOUR-PASSPHRASE, changing the cipher name to the one you used. The output is the Salted__ header, an 8-byte salt and the ciphertext, with PBKDF2-HMAC-SHA256 and 10,000 iterations. GCM, Speck and XXTEA are not available in openssl enc.

Why does the ciphertext change every time with the same passphrase?

Each encryption draws a new random 8-byte salt, so the derived key and IV are different every time. This is deliberate: it stops anyone telling that two messages are the same and prevents nonce reuse in GCM and CTR. Every version still decrypts to the same text with the same passphrase.

Why does decryption say the passphrase or key is wrong?

Because the padding or, for GCM, the authentication tag did not check out. That happens with a wrong passphrase or key, a different cipher, key size or mode than was used to encrypt, a missing or wrong IV, or a ciphertext that was cut short or changed. Check that the Ciphertext format matches the input, Base64 or hex.

Are my text and keys sent anywhere?

No. Encryption, decryption and key derivation run in your browser, AES through the @noble/ciphers library and PBKDF2 through the browser's Web Crypto API. Nothing is uploaded or stored, and everything is forgotten when you close the tab.

Other related tools