Simple Substitution Cipher

Encrypt and decrypt text with a classic Simple Substitution Cipher. Use a shuffled alphabet key, preserve spaces and punctuation, and learn how monoalphabetic substitution works.

Input
0 chars · 0 bytes
Try:
Result
✓ Classic monoalphabetic substitution cipher ✓ Key: any permutation of the alphabet ✓ Multiple alphabets supported ✓ Processed on our server
Examples
Encrypt HELLO WORLD Key: QWERTYUIOPASDFGHJKLZXCVBNM
Input HELLO WORLD
Output ITSSG VGKSR

With the QWERTY key: H→I, E→T, L→S, O→G, W→V, R→K, D→R.

Encrypt ATTACK AT DAWN Key: QWERTYUIOPASDFGHJKLZXCVBNM
Input ATTACK AT DAWN
Output QZZQEA QZ RQVF

With the QWERTY key: A→Q, T→Z, C→E, K→A, D→R, W→V, N→F.

Decrypt ciphertext Key: QWERTYUIOPASDFGHJKLZXCVBNM
Input ITSSG VGKSR
Output HELLO WORLD

Reverse lookup: I→H, T→E, S→L, G→O, V→W, K→R, R→D.

Preserve case and punctuation Key: QWERTYUIOPASDFGHJKLZXCVBNM
Input Meet at 10:00!
Output Dttz qz 10:00!

Only alphabet letters are substituted. Spaces, numbers, punctuation, and letter case are preserved.

How the Simple Substitution Cipher works

The Simple Substitution Cipher is a classical monoalphabetic substitution cipher. It replaces each plaintext letter with the letter in the same position of a shuffled cipher alphabet. For English, the normal alphabet is ABCDEFGHIJKLMNOPQRSTUVWXYZ, while the key might be QWERTYUIOPASDFGHJKLZXCVBNM.

To encrypt, find a plaintext letter in the normal alphabet and take the matching letter from the key. With the QWERTY key, A becomes Q, B becomes W, C becomes E, and so on. To decrypt, reverse the lookup: find the ciphertext letter in the key and convert it back to the letter in the normal alphabet.

The same substitution table is used for the whole message, which is why this method is called monoalphabetic. Spaces, punctuation, digits, and other non-alphabet characters are preserved unchanged, and letter case is kept in the output.

Online Simple Substitution encoder and decoder

This tool can encode plaintext into a substitution ciphertext or decode a ciphertext back into readable text when you know the same alphabet key. Enter your message, choose encrypt or decrypt, and provide a full shuffled alphabet as the key.

The service validates the key before processing. A valid key must contain every letter of one supported alphabet exactly once, with no missing or repeated letters. The alphabet is detected from the key, so an English key processes English letters, a Russian key processes Russian letters, and so on.

Keys, alphabets, and preserved characters

The key is the most important part of a simple substitution cipher. It is not a keyword or a numeric shift; it is the complete cipher alphabet written in substitution order. For a 26-letter English alphabet, the key must also contain 26 unique letters.

The tool supports multiple language alphabets, including English, Russian, Spanish, German, French, Italian, Portuguese, and Turkish. Characters that do not belong to the detected alphabet are left untouched, which makes it easy to keep word spacing, commas, periods, numbers, and formatting while encrypting only the letters.

Security and frequency analysis

A simple substitution cipher has a huge number of possible keys. For the English alphabet there are 26! possible alphabet permutations, far more than a person could test manually. However, the cipher is still not secure for real privacy.

Because each plaintext letter always becomes the same ciphertext letter, the statistical pattern of the language remains visible. Common letters, repeated words, double letters, and frequent bigrams can reveal the substitution table. This makes the cipher useful for learning, puzzles, escape rooms, and historical demonstrations, but not for protecting sensitive data.

FAQ

The key is a permutation of the full alphabet — every letter of the alphabet appears exactly once, but in a scrambled order. For example, if the standard English alphabet is ABCDEFGHIJKLMNOPQRSTUVWXYZ and the key is QWERTYUIOPASDFGHJKLZXCVBNM, then A is always replaced by Q, B by W, and so on. The same key is used for all letters throughout the message.

For the 26-letter English alphabet there are 26! (about 4×10²⁶) possible keys — far more than a brute-force attack can try. Despite this enormous key space, the cipher is broken easily by frequency analysis, because each ciphertext letter always maps to the same plaintext letter.

The Caesar cipher is a special case of simple substitution where the cipher alphabet is just the standard alphabet shifted by a fixed number of positions. Simple substitution allows any permutation of the alphabet as the key, giving far more possible keys, though both ciphers share the same weakness to frequency analysis.

Sometimes, especially if the ciphertext is long enough. Because the same substitution is used throughout the whole message, frequency analysis, common word patterns, repeated letters, and likely phrases can help reconstruct the key. Short messages are much harder to solve because they contain fewer statistical clues.

A valid key must be a complete permutation of one supported alphabet. Every letter must appear exactly once, with no duplicates and no missing letters. For English, a valid key contains 26 unique letters; for other supported languages, the key length and characters must match that language alphabet.

No. This tool transforms only letters from the detected alphabet. Spaces, digits, punctuation marks, and other symbols are copied to the output unchanged, and uppercase letters remain uppercase.

No. It is a historical and educational cipher, not a modern security method. Even though the key space is enormous, monoalphabetic substitution preserves language frequency patterns, so it can be broken with classical cryptanalysis.

The service supports several language alphabets, including English, Russian, Spanish, German, French, Italian, Portuguese, and Turkish. The selected alphabet is determined by the characters in the substitution key.
Related tools

Caesar Cipher

Classic letter-shift cipher with custom shift values.

XOR Cipher

Online XOR encryption and decryption with text or hex keys.

Playfair Cipher

Classic digraph substitution cipher with keyword matrix encryption.

Vigenere Cipher

Keyword-based polyalphabetic encryption and decryption.