canada-dark-flag

Privacy Canada is community-supported. We may earn a commission when make a purchase through one of our links. Learn more.

Simple Substitution Cipher with Examples

author-image
Ludovic Rembert
Last Updated on April 28, 2026
Simple substitution cipher icon showing letter replacement diagram

A simple substitution cipher is one of the oldest and most straightforward encryption methods in cryptography. It works by replacing every letter in a plaintext message with a different, predetermined letter from a substitution alphabet — so that the original message becomes unreadable to anyone who does not possess the cipher key. For example, every “A” might become “W”, every “B” might become “K”, and so on across all 26 letters of the alphabet.

Unlike more complex modern encryption algorithms, the simple substitution cipher requires no computer, no advanced mathematics, and no special equipment. All you need is a cipher key — a mapping that tells you which letter replaces which — and you can encrypt or decrypt any message by hand. This simplicity is both its greatest strength and its most significant weakness.

In this guided tutorial, you will learn exactly how a simple substitution cipher works, see concrete worked examples of encryption and decryption, understand how to solve one without the key using frequency analysis, and discover where substitution ciphers are still used in modern privacy and security contexts today.

Reasons to Encrypt with a Substitution Cipher

Substitution ciphers have been used for centuries — dating back to ancient Rome, where Julius Caesar famously used a simplified version (the Caesar cipher) to protect military communications. A substitution alphabet has to be established for the encryption to make any sense. This means that all 26 letters of the traditional alphabet need to be reassigned to a different letter in the substitution alphabet.

Normal Alphabet Substitution Alphabet
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 W K P O R A C N B M E Q T V S L I J F D G H U X Z Y

An encryption key can now be used to encode and decode messages. For example, let’s walk through encrypting “Hello World!” using the substitution alphabet shown above. We look up each letter individually: H→N, E→R, L→Q, L→Q, O→S, (space), W→U, O→S, R→J, L→Q, D→O. Our message becomes “NRQQS USJQO!” after applying the substitution cipher. To decrypt it, the recipient simply reverses the process using the same key.

Here is a second worked example to reinforce the concept. Let’s encrypt the word “CANADA” using the same key above: C→P, A→W, N→V, A→W, D→O, A→W. The encrypted result is “PWVWOW”. Notice how the three A’s all become W’s — this consistent one-to-one mapping is a defining characteristic of the simple substitution cipher, and it is also the property that makes frequency analysis attacks possible.

One of the most common reasons to encrypt with a substitution cipher is to protect information. The underlying principle of the simple substitution cipher — replacing one symbol with another according to a secret key — is a foundational concept in cryptography that has influenced the development of more sophisticated encryption systems. While modern applications use far more complex algorithms, understanding the substitution cipher provides essential groundwork for studying those systems.

Letters in the alphabet can also be substituted with numbers, characters, or other similar assets. With a simple digit-based substitution, the letter A = 1, B = 2, and so on until you get to the letter Z, which would equal 26. This numeric variant is sometimes called a polybius-style substitution and is commonly seen in beginner cryptography puzzles and escape room challenges. You can also substitute letters with symbols, binary sequences, or even emoji — the core mechanism remains identical as long as the mapping is consistent and complete.

The simple substitution cipher also has significant educational value. It is widely used in schools, cryptography courses, and puzzle books to introduce students to the fundamental concepts of encryption, decryption, and cipher keys. Understanding how a simple substitution cipher works provides the conceptual groundwork needed to understand more advanced systems like the Vigenère cipher, the Enigma machine, and modern AES encryption.

How to Solve a Simple Substitution Cipher

Alphabet icon representing letter frequency analysis for solving substitution ciphers

Advanced computer programs can solve substitution ciphers quite easily because of the rapid processing power and some tendencies that become apparent in the English language. Even without a computer, a skilled cryptanalyst can crack a simple substitution cipher in minutes if the ciphertext is long enough — typically anything over 100 characters provides sufficient data for a reliable frequency analysis attack.

Every letter in the English language shows up in words a certain percentage of the time. The most frequently occurring letters in standard English text, in order, are: E (12.7%), T (9.1%), A (8.2%), O (7.5%), I (7.0%), N (6.7%), S (6.3%), H (6.1%), R (6.0%). This distribution is remarkably consistent across large samples of English text, which makes it a powerful tool for breaking substitution ciphers.

The vowels are typically among the most common letters in the alphabet. The letters T, N, S, R, and H are the most common consonants. Beyond individual letter frequency, cryptanalysts also look at digraph frequency (pairs of letters that commonly appear together, such as TH, HE, IN, ER, AN, RE, ON, EN) and trigraph frequency (three-letter combinations like THE, AND, ING, ION, ENT). These patterns dramatically narrow down the possible substitution mappings.

Account for Letter Usage Percentage ✉️

If you had a massive message to decode, you could use the knowledge of the letter tendencies to make assumptions about the substitution alphabet that was used to encrypt the message. Computer programs can also be used to narrow down your options. Here is a practical step-by-step approach to solving a simple substitution cipher by hand:

Step 1: Count the frequency of every letter in the ciphertext. The most frequent ciphertext letter is most likely the substitute for E. The second most frequent is likely T or A. Step 2: Look for single-letter words — in English, these are almost always “I” or “A”. Step 3: Look for two-letter words. The most common two-letter words in English are: OF, TO, IN, IS, IT, BE, AS, AT, SO, WE, HE, BY, OR, ON, DO, IF, ME, MY, UP. Step 4: Look for three-letter words. THE is by far the most common three-letter word in English. Once you identify THE in the ciphertext, you have three confirmed letter mappings. Step 5: Use your confirmed mappings to fill in partial words and make educated guesses about the remaining letters.

Unfortunately, this technique is really only ideal for super-long messages. Shorter messages don’t provide enough information for assumptions to be made about letter frequencies. A ciphertext of fewer than 50 characters may not contain enough instances of any single letter to establish reliable frequency patterns. This is why very short encrypted messages — such as a single word or a brief code phrase — are actually harder to crack by frequency analysis than longer ones, even though they contain less information overall.

It goes to show that even without the encryption key, you could find ways to decode the message. Solving a substitution cipher isn’t as challenging as it might seem, but there are also a few additional ways to make the encrypted message more challenging to solve. One effective technique is to use a homophonic substitution cipher, where high-frequency letters like E are assigned multiple possible ciphertext symbols, making frequency analysis much less effective. Another approach is to deliberately introduce null characters — meaningless symbols that the recipient knows to ignore — to distort the frequency distribution.

The Importance of Punctuation and Formatting

Ciphered message icon illustrating punctuation removal and formatting changes in substitution ciphers

In most cases, punctuation is removed and formatting is changed when using a substitution alphabet to create a ciphered message. This is not merely a stylistic choice — it is a deliberate security measure. Punctuation and word spacing provide enormous amounts of structural information to a cryptanalyst. Knowing where words begin and end makes it dramatically easier to identify short words like “a”, “I”, “the”, and “and”, which in turn can unlock the entire cipher key.

Let’s revisit the “Hello World!” scenario again and assume that we remove punctuation and formatting in the encrypted message. The message would become “NRQQS USJQO”. Notice how there is no longer an exclamation point at the end of the encrypted message. At this point, it is recommended that the formatting is manipulated. For example, you might format the message in the following way: “NR QQS US JQO”.

The encrypted message now appears to be four different words instead of two. This formatting change and the removal of punctuation has automatically made it quite a bit more challenging to solve. A cryptanalyst looking at “NR QQS US JQO” would have no way of knowing that the original message was two words rather than four, and the apparent two-letter word “NR” and two-letter word “US” would send them down incorrect analytical paths.

Professional cryptographers take this concept even further. A common technique is to break the ciphertext into fixed-length groups of five characters, regardless of the original word boundaries. For example, a longer message like “NRQQSUSJQOWKVWPWRQQS” would be transmitted as “NRQQS USJQO WKVWP WRQQS”. This five-letter grouping convention was standard practice in military and diplomatic communications throughout the 19th and 20th centuries, and it completely eliminates word-boundary information from the ciphertext.

Another formatting technique is to insert deliberate misspellings or unusual word choices in the plaintext before encryption. Since the recipient knows the convention, they can correct for it after decryption — but the cryptanalyst working on the ciphertext has no way of knowing that certain letter patterns represent intentional errors rather than real words.

Encrypted Emails

Encrypted emails illustration showing how substitution ciphers protect email communications

A lot of potentially sensitive information is transferred through email every single day. Understanding how substitution ciphers work can help illustrate the foundational principles behind email encryption. Modern email encryption protocols like PGP (Pretty Good Privacy) and S/MIME use asymmetric cryptography that is far more sophisticated than a simple substitution cipher, but the core concept — transforming readable plaintext into unreadable ciphertext using a key — is the same foundational idea.

There are several high-quality secure email service providers that provide users with the ability to encrypt email messages to protect sensitive information. Services like ProtonMail, Tutanota, and Hushmail implement end-to-end encryption that ensures only the intended recipient can read the message — even the email provider itself cannot access the plaintext content.

The contacts on an email list might have knowledge of a pre-existing encryption key, also known as the substitution alphabet. In a small, trusted group — such as a team of journalists protecting a source, or a family sharing sensitive financial information — a pre-shared simple substitution cipher key can provide a practical, low-tech layer of protection that does not require any special software or technical knowledge to implement.

Additional Layer of Protection 🛡️

This could be an alpha-numeric key, or perhaps something as simple as what was previewed above. Regardless, this is one way to place an additional layer of protection and security on your email messages. The concept of layered security — sometimes called “defence in depth” — is a cornerstone of modern cybersecurity practice. Even if one layer of protection is compromised, additional layers continue to protect the underlying information.

It is important to note that a simple substitution cipher is not a substitute for modern encryption standards and should never be used as the sole protection for genuinely sensitive communications in a professional or legal context. For those use cases, industry-standard encryption tools such as PGP or S/MIME are essential. However, as a supplementary layer or as a teaching tool for understanding encryption fundamentals, the simple substitution cipher remains highly relevant and practical.

One interesting real-world application is in the realm of steganography combined with substitution ciphers. A message can first be encrypted using a substitution cipher, and then the resulting ciphertext can be hidden within an innocuous-looking document or image. This two-layer approach — hiding the existence of the message while also encrypting its content — provides significantly stronger protection than either technique alone.

Encrypted Passwords

Encrypted passwords illustration showing how substitution ciphers can protect password storage

In some cases, it might be useful to use a password manager to encrypt your passwords. There are several reputable password managers that use encryption to protect sensitive information. Modern password managers typically use AES-256 encryption — a symmetric block cipher that is orders of magnitude more complex than a simple substitution cipher — but the underlying goal is identical: transform your passwords into an unreadable form that can only be recovered with the correct key.

These programs use advanced encryption algorithms with multiple layers of protection and security when it comes to something as sensitive as a password. A typical password manager will hash your master password using a one-way function like bcrypt or Argon2, derive an encryption key from that hash, and then use that key to encrypt your stored passwords with AES-256. This multi-layer approach ensures that even if the password manager’s database is stolen, the attacker cannot recover your passwords without knowing your master password.

You could choose to use a password manager to simply encrypt and manage your existing passwords for all of your accounts. The encryption utilities are effective and useful, but some vulnerabilities could still exist. For example, if your master password is weak or reused, or if your device is compromised by malware, the encryption protecting your stored passwords may be bypassed entirely — not because the cipher was broken, but because the key was obtained through other means.

Understanding the simple substitution cipher can help illustrate why layered security matters. For example, if your actual password is “BlueSky99!”, a personal substitution cipher applied as an additional layer would mean that even if someone accessed your stored data, they would still need to know your personal substitution key to recover the real password. However, it is important to understand that a simple substitution cipher alone provides very limited security and should not be relied upon as a primary protection mechanism for passwords.

It is important to understand the difference between encryption and hashing in the context of password security. A simple substitution cipher is a reversible encryption — given the key, you can always recover the original plaintext. Password hashing, by contrast, is a one-way process: you can verify that a password matches a stored hash, but you cannot reverse the hash to recover the original password. For storing passwords in databases, hashing is always preferred over encryption, including substitution ciphers.

Frequently Asked Questions

What is a simple substitution cipher?

A simple substitution cipher is an encryption method that replaces every letter in a plaintext message with a different, predetermined letter from a substitution alphabet. Anyone without the cipher key cannot read the original message. It is one of the oldest known encryption techniques, with documented use dating back to ancient Rome.

How do you encrypt a message with a simple substitution cipher?

To encrypt a message, first create a substitution alphabet that maps each of the 26 letters to a unique different letter. Then replace each letter in your plaintext message with its corresponding ciphertext letter according to that key. Numbers, punctuation, and spaces are typically removed or handled separately to reduce the information available to a cryptanalyst.

How do you solve a simple substitution cipher without the key?

You can solve a simple substitution cipher using frequency analysis. Count how often each letter appears in the ciphertext, then match those frequencies to known English letter frequencies — E is most common at 12.7%, followed by T at 9.1%. Also look for single-letter words (A or I), common two-letter words (OF, TO, IN), and the three-letter word THE to confirm mappings quickly.

Is a simple substitution cipher secure?

No. A simple substitution cipher is not secure for modern use. It is vulnerable to frequency analysis attacks and should never be used as the sole protection for genuinely sensitive communications. Modern encryption standards such as AES-256 should be used for any application where real security is required.

What is the difference between a substitution cipher and a Caesar cipher?

A Caesar cipher is a special case of a substitution cipher where every letter is shifted by a fixed number of positions in the alphabet. A simple substitution cipher uses a completely arbitrary mapping, giving it far more possible keys than the Caesar cipher’s 25 possible shifts — but both are vulnerable to frequency analysis.

Conclusion

The simple substitution cipher is commonly used in cryptography, even though it can easily be solved, especially if the encryption is very long. The ability to change formatting and punctuation will certainly help protect the encryption in some ways, but it is still possible to solve. For any application where genuine security is required, the simple substitution cipher should be combined with other techniques or replaced entirely by modern cryptographic standards.

Advanced ciphers are probably a little bit safer than the simple substitution cipher, but that doesn’t mean that they are completely useless. There are still several different purposes that use simple substitution ciphers, and it certainly isn’t the worst idea to start using them yourself. They remain valuable as educational tools, as supplementary security layers, as the basis for more complex cipher systems, and as a practical introduction to the principles of cryptography that underpin all modern digital security.

Simple substitution ciphers have been used for many centuries. There is no reason to expect that they will stop being used anytime soon. Some of the substitution ciphers were used for centuries, such as the Baconian cipher. The ROT13 cipher — a special case of the Caesar cipher where every letter is shifted by 13 positions — is still widely used today on internet forums and in software development contexts to obscure spoilers or mildly sensitive text. Even the simple substitution cipher, in its most basic form, continues to appear in newspaper puzzles, escape rooms, educational curricula, and hobbyist cryptography communities around the world.

Whether you are a student learning the fundamentals of cryptography, a privacy-conscious individual looking for practical ways to protect your communications, or simply someone who enjoys the intellectual challenge of encoding and decoding secret messages, the simple substitution cipher is an excellent starting point. Master it, understand its strengths and limitations, and you will have a solid foundation for exploring the rich and fascinating world of cryptography.

Related posts