Encrypt or decrypt text using a simple substitution cipher (monoalphabetic cipher). Each letter is replaced with another letter based on a custom alphabet key.
Result: SVOOL DLIOW
Note: The alphabet key must contain 26 unique letters (A-Z). For example, a key starting with "ZEBRAS..." maps A→Z, B→E, C→B, etc.
What is a Simple Substitution Cipher?
A simple substitution cipher (also known as a monoalphabetic substitution cipher) is one of the oldest and simplest encryption techniques. Each letter in the plaintext is replaced by a different letter according to a fixed substitution rule. The entire alphabet is mapped to a shuffled alphabet key.
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
Key: Z E B R A S C D F G H I J K L M N O P Q T U V W X Y
Using this key, "HELLO" becomes "SVOOL" — each letter is substituted with the corresponding letter from the key alphabet. Decryption reverses the process using the same key.
The simple substitution cipher is vulnerable to frequency analysis attacks, as letters like 'E', 'T', and 'A' appear more frequently in English and can be identified by their repeated occurrences .
Key features:
- Custom key — you can create your own substitution alphabet
- Encrypt/Decrypt — both operations supported with the same key
- Random key generation — quickly create a secure random substitution
- Preserves case — maintains uppercase/lowercase formatting
- Non-alphabetic characters — spaces, numbers, and punctuation remain unchanged
How to Use This Calculator
- Enter text: Type or paste your plaintext or ciphertext in the text area.
- Enter key: Provide a 26-letter alphabet key containing each letter exactly once. For example:
ZEBRASCDFGHIJKLMNOPQTUVWXY. - Select mode: Choose “Encrypt” to encode your text or “Decrypt” to decode it.
- Process: Click the “Process” button or press Enter.
- Random key: Click “Generate Random Key” to create a random substitution alphabet.
- Reset: Use “Reset” to restore default values.
- Interpretation: The result shows the encrypted or decrypted text. For example, encrypting “HELLO WORLD” with key “ZEBRAS…” gives “SVOOL DLIOW”.