Encryption Playground
This interactive tool allows you to experiment with different encryption algorithms and understand how they transform your data. Choose an algorithm, enter your text, and see the encryption in action.
The Caesar Cipher is one of the simplest encryption techniques. It works by shifting each letter in the plaintext by a fixed number of positions down the alphabet.
Output will appear here
The Vigenère cipher is a method of encrypting alphabetic text by using a simple form of polyalphabetic substitution. It uses a keyword to shift each letter in the plaintext.
Output will appear here
Advanced Encryption Standard (AES) is one of the most widely used symmetric encryption algorithms. It operates on blocks of data and uses the same key for both encryption and decryption.
Output will appear here
RSA is an asymmetric encryption algorithm using a pair of keys: a public key for encryption and a private key for decryption. This is a simplified demonstration.
Public key will appear here
Private key will appear here
Output will appear here
Base64 is an encoding scheme used to represent binary data in ASCII string format. It's not encryption but is often used in cryptographic workflows.
Output will appear here
How Caesar Cipher Works
The Caesar cipher is a substitution cipher where each letter in the plaintext is shifted a certain number of places down the alphabet.
Each letter is moved 3 positions forward in the alphabet:
Result: "HELLO" becomes "KHOOR"
This shows how each letter maps to another when shifted by 3 positions:
Plain: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Cipher: D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
The Caesar cipher is extremely weak because:
- There are only 25 possible shifts (keys)
- It can be easily broken with frequency analysis
- Patterns in the original text remain in the ciphertext
This cipher is primarily used for educational purposes and historical context.
How Vigenère Cipher Works
The Vigenère cipher improves upon the Caesar cipher by using a keyword to determine different shift values for each letter of the plaintext.
The key is repeated to match the length of the plaintext:
Plaintext: H E L L O Key: K E Y K E
Each letter is shifted according to the corresponding key letter's position in the alphabet (A=0, B=1, ..., Z=25):
Result: "HELLO" becomes "RIJVS"
The traditional method uses the Vigenère square/table, a grid where each row represents a different Caesar cipher:

To encrypt, find the row with the key letter and the column with the plaintext letter. The intersection is the ciphertext letter.
The Vigenère cipher was considered "unbreakable" for centuries, but now it can be broken with:
- Kasiski examination - finding repeated text patterns
- Frequency analysis - examining statistical properties
- Index of coincidence methods
The security depends heavily on the key length and randomness. Longer keys provide better security.
How AES Encryption Works
Advanced Encryption Standard (AES) is a symmetric block cipher that processes data in fixed-size blocks using the same key for both encryption and decryption.
- Block Size: 128 bits (16 bytes)
- Key Sizes: 128, 192, or 256 bits
- Rounds: 10, 12, or 14 (depending on key size)
AES performs several operations in rounds:
- SubBytes: Substituting bytes using a lookup table
- ShiftRows: Shifting rows of the state array
- MixColumns: Mixing data within columns
- AddRoundKey: XORing with the round key

AES is considered highly secure and is used worldwide for sensitive data protection:
- No practical attacks against full AES have been discovered
- Theoretical attacks require computational resources beyond current technology
- AES-256 is approved for top secret information by the US government
The security depends on keeping the key secret and implementing the algorithm correctly.
How RSA Encryption Works
RSA is an asymmetric cryptosystem that uses a pair of keys: a public key for encryption and a private key for decryption.
- Choose two large prime numbers, p and q
- Compute n = p × q
- Calculate φ(n) = (p-1) × (q-1)
- Choose e (public exponent) such that 1 < e < φ(n) and gcd(e, φ(n)) = 1
- Compute d (private exponent) such that d × e ≡ 1 (mod φ(n))
Public key: (n, e)
Private key: (n, d)
For a message m:
Encryption: c = m^e mod n Decryption: m = c^d mod n

RSA security relies on the computational difficulty of factoring large numbers:
- The security increases with key size (2048 or 4096 bits recommended)
- Quantum computers pose a theoretical threat to RSA
- Proper implementation is critical to prevent side-channel attacks
RSA is often used to encrypt small amounts of data or to exchange symmetric keys.
How Base64 Encoding Works
Base64 is an encoding scheme that represents binary data in an ASCII string format by translating it into a radix-64 representation.
Base64 encoding works by:
- Taking 3 bytes (24 bits) of binary data
- Splitting it into 4 groups of 6 bits each
- Converting each 6-bit value to a character in the Base64 alphabet (A-Z, a-z, 0-9, +, /)
Original text: "Man"
ASCII values: M (77), a (97), n (110)
Binary: 01001101 01100001 01101110
Grouped into 6 bits: 010011 010110 000101 101110
Base64 values: 19, 22, 5, 46
Base64 characters: T, W, F, u
Result: "TWFu"
If the input length is not divisible by 3, padding is added with the "=" character:
"M" → 01001101 00000000 00000000 → "TQ==" "Ma" → 01001101 01100001 00000000 → "TWE="
Base64 is not encryption, but encoding. It's commonly used for:
- Embedding binary data in text formats like JSON or XML
- Encoding email attachments (MIME)
- Embedding image data directly in HTML/CSS
- Transmitting binary data over text-only protocols
It increases data size by approximately 33% but ensures safe transmission through text-based systems.