This article was co-authored by our trained team of editors and researchers who validated it for accuracy and comprehensiveness. Together, they cited information from 7 references, which can be found at the bottom of the page.

Substitution ciphers are a way of encrypting or disguising language so that a phrase or paragraph can’t be read by anyone who doesn’t know the cipher. Ciphers are commonly made by substituting one letter for another. They’re a fun way for groups of friends to pass information back and forth without their peers (or teachers) being able to read the information. Begin working with ciphers by coming up with your own cipher alphabet and encoding simple words or sentences.

Steps

Sample Coded Paragraphs

Part 1

Choosing a Substitution Sequence

1

Reverse the alphabet to create a basic cipher alphabet. Substitution ciphers work by creating a disordered alphabet, allowing you to substitute letters for other letters. For a straightforward substitution cipher, simply use the alphabet backwards, so that “a” becomes “z,” “b” becomes “y,” “c” becomes “x,” and so on.[1]

This substitution cipher would read: ZYXWVUTSRQPONMLKJIHGFEDCBA.

This second alphabet is often referred to as the “ciphertext.”

2

Replace every letter with the letter 3 before it for a more complex cipher. Just writing the alphabet backwards for your cipher is pretty simple and will be easy to crack. If you’d like a more complex cipher, replace every letter with the letter that comes 3 before it in the alphabet.[2]

As an easy example, using this cipher, the word “CAT” reads “ZYQ.”

3

Substitute an arbitrary 5-letter sequence for each letter of the alphabet. This is known as Bacon’s Code. Bacon’s Code replaces each letter of the English alphabet with a 5-letter sequence. These sequences begin with “AAAAA” and add “B”s in an arbitrary order. So, in Bacon’s Code, A = AAAAA; B = AAAAB; C = AAABA; D = AAABB and so on. Maintain this pattern to fill in the rest of the alphabet, or make up your own 5-letter replacements.[3]

When reading messages in Bacon’s Code, pause every 5 letters to decode the letter. For example, the message “AAABAAABAAABABBABABB ABBBBAABBBABBBAABBABAABAA” reads “CELL PHONE”

Part 2

Notating Your Substitution Alphabet

1

Write the 2 alphabet sequences on a sheet of paper. Write out the standard English alphabet at the top of a sheet of paper: ABCDEFGHIJKLMNOPQRSTUVWXYZ. Then, beneath that, write out the substitution letters. Replacing every letter with the letter 3 before it instead reads: XYZABCDEFGHIJKLMNOPQRSTUVW. So, your cipher sheet would look like this:[4]

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

X Y Z A B C D E F G H I J K L M N O P Q R S T U V W

2

Use an online substitution generator to save paper. If you’d rather not have to laboriously write out by hand the entire cipher sequence—and each coded message—try using a cipher website. Cipher websites allow you to select which letter of the alphabet will be substituted for each other letter. Once you’ve keyed in the substitutions, you can use the cipher website to both encode and decoded messages.

Add symbols into the cipher to make it harder to crack. If you’re worried that people (e.g., friends or parents) may try to crack your cipher, don’t limit yourself to using only letters. Introduce some symbols to your cipher.[5] This way, encoded words will include punctuation symbols and not just letters, making them more confusing to people without the encryption code. For example, your encryption cipher with symbols could read:

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.

X Y Z & B C D E # G H I J K $ M N O P Q R @ T U = W.

Using this cipher, the message “HOW ARE YOU” would read “E$T XOB =$R.”

If this is your first time creating (or using) a substitution cipher, you might want to skip this step.

Part 3

Encrypting and Decrypting Messages

1

Pick a word or phrase to encrypt. Before you can create an encrypted message, you’ll need text to encode. If this is your first time encoding a message using a substitution cipher, start simple. Pick a short word or 2 to encode, rather than a long paragraph. For example, try the phrase “open door.”

Once you’re familiar with the encryption process, start encoding longer phrases or sentences.

Online cipher encryption sites can make encoding full paragraphs much easier.

2

Replace each letter in the phase with a letter from the cipher alphabet. Go through your English phrase or word letter by letter and replace the English letter with the corresponding letter from your ciphertext. Find the replacement letters by identifying the English letter, then looking beneath it to find the corresponding letter in the ciphertext[6]

For example, say that you’re using the ciphertext in which you replaced each letter of the alphabet by the letter 3 before it. The English phrase “OPEN DOOR” when encoded in your ciphertext would read: “LMBK ALLO.”

3

Decrypt a coded message by finding the substitute for cipher letters. To translate a coded message back into English, reverse the process you used to encode a message. For each letter of the encoded message in the ciphertext alphabet, find the letter it corresponds to in the English alphabet. Write out each letter 1 at a time to decrypt the message.[7]

For example, let’s say that you’re still using the ciphertext that replaces standard alphabet letters with the letter 3 before them. If your friend passes you a code that reads “ZLLI EXQ. IRKZE PLLK?” you can use the cipher alphabet to decrypt it. You’ll discover that the message says “COOL HAT. LUNCH SOON?”

Community Q&A

Tips

There are various other existing substitution ciphers that you can base your newly made cipher code on. If you'd like, try using one of the more well-known ciphers. These include the CrissCross code, the Nihilist Number Code, and the Key-Word (or Key-Number) Code.

If you’re concerned that others (e.g., a nosy sibling) may find the paper on which you’ve written your cipher sequence, you could memorize the sequence instead.

You can create a substitution cipher for any language that uses the Latin alphabet. While all examples in this article are in English, you can make a cipher using the same principles in Spanish, French, German, etc.