# Substitution Cipher > Encode and decode with any cipher alphabet or keyword, or paste a cryptogram and let the solver crack it; then fix any letter yourself. - Page: https://linguaholic.com/tools/substitution-cipher/ - Type: free online tool (Converters & translators), no sign-up, runs in the browser - Publisher: Linguaholic (https://linguaholic.com/), made by Marcel Iseli - Last updated: October 3, 2026 - Open it pre-filled: https://linguaholic.com/tools/substitution-cipher/?text=Itssg+Vgksr&key=QWERTYUIOPASDFGHJKLZXCVBNM&mode=decode - `text`: text to encode or decode (for example `Hello World`) - `mode`: direction: encode (default) or decode (for example `decode`) - `key`: cipher alphabet: all 26 letters, each exactly once (alias: alphabet); anything else is ignored; default QWERTYUIOPASDFGHJKLZXCVBNM (for example `QWERTYUIOPASDFGHJKLZXCVBNM`) - `open`: open a section: crack (the cryptogram solver), steps (plain and cipher alphabet with worked letters), frequency (letter counts) or identify (which cipher is this?) (for example `crack`) ## What is a substitution cipher? In a **simple substitution cipher** every letter of the alphabet is swapped for another letter, and the swap never changes: if A becomes Q once, it becomes Q every time. The key is the scrambled alphabet itself, the **cipher alphabet**, written under the normal one. Because one fixed alphabet is used for the whole message, it is also called a **monoalphabetic** substitution cipher. A puzzle that hides a quotation this way is a **cryptogram**. The [Caesar cipher](https://linguaholic.com/tools/caesar-cipher/), [Atbash](https://linguaholic.com/tools/atbash-cipher/) and the [affine cipher](https://linguaholic.com/tools/affine-cipher/) are all substitution ciphers whose alphabet follows a simple rule. A general substitution cipher can use *any* order of the 26 letters, which gives an enormous number of keys, and yet a few sentences of code are usually enough to solve it by hand. ## How to use the substitution cipher decoder and encoder 1. Choose **Encode** or **Decode**. 2. Enter the **cipher alphabet**: all 26 letters, each once. The first letter is what A becomes, the second is what B becomes, and so on. You can also type a keyword in **Or build it from a keyword**, or press **Random alphabet** for a fresh scrambled key. 3. Type or paste the message. Case, spaces, digits and punctuation are kept. 4. Copy the result. To share the key, copy the cipher alphabet from the key box. ## Frequently asked questions **What is a substitution cipher?** A cipher that replaces every letter with another letter according to a fixed cipher alphabet. If A becomes Q once, it becomes Q everywhere in the message. **How do I decode a substitution cipher without the key?** Paste the message, open the Cryptogram solver and press Solve. It pairs common code letters with common English letters, then keeps swapping letters while the text reads more like English. You can type corrections under any code letter and solve again. **How do you solve a cryptogram by hand?** Count the letters (the most common is often E), look at one-letter words (A or I) and repeated three-letter words (THE, AND), and use word shapes such as double letters. Each correct letter you place reveals more words. **How many keys does a substitution cipher have?** Any order of the 26 letters can be a key, which gives 26 factorial, about 4 x 10^26, possible alphabets. Even so, frequency analysis breaks it because each letter keeps its own pattern. **What is a keyword cipher?** A substitution cipher whose alphabet is built from a keyword: the keyword's letters without repeats, followed by the rest of the alphabet in order. Type a keyword into the tool and it builds that alphabet for you. **What is the difference between monoalphabetic and polyalphabetic substitution?** A monoalphabetic cipher uses one cipher alphabet for the whole message, so letter counts survive. A polyalphabetic cipher, such as Vigenère, switches between several alphabets, which flattens the counts and makes it much harder to solve. **Is the Caesar cipher a substitution cipher?** Yes. Caesar, Atbash and the affine cipher are substitution ciphers whose alphabet follows a simple rule, so the cryptogram solver cracks them too. **How long does a message need to be for the solver to work?** A sentence or two with the spaces kept is usually enough. Under about 40 letters, or without spaces, several answers can look right, so pin the letters you are sure of and solve again. **Is my text private?** Yes. Encoding, decoding and solving all happen in your browser, and nothing you type is uploaded or stored. ## Data sources The code breaker's English letter frequencies and word checks come from Linguaholic’s English dictionary, built from the open ENABLE and SCOWL word lists. Licenses and notices: https://linguaholic.com/tools/data/dict/v1/NOTICE.txt ## Related tools - [Caesar Cipher](https://linguaholic.com/tools/caesar-cipher/): Encode and decode the Caesar shift cipher with any shift from 1 to 25, or crack a message without the key: every shift is tried and ranked for you. - [Vigenère Cipher](https://linguaholic.com/tools/vigenere-cipher/): Encode and decode the Vigenère cipher with a keyword, or crack a message without the key: the tool finds the key length and the keyword for you. - [Affine Cipher](https://linguaholic.com/tools/affine-cipher/): Encode and decode the affine cipher with keys a and b, see the arithmetic for every letter, or crack a message by trying all 312 keys. - [Atbash Cipher](https://linguaholic.com/tools/atbash-cipher/): Encode and decode the Atbash cipher, which swaps each letter with its mirror (A↔Z, B↔Y), with the alphabet chart, step-by-step working and examples. - [A1Z26 Cipher](https://linguaholic.com/tools/a1z26-cipher/): Decode and encode the A1Z26 cipher, where A=1, B=2 and Z=26: letters to numbers and numbers to letters, with a full chart and puzzle tips. - [Morse Code Translator](https://linguaholic.com/tools/morse-code-translator/): Translate text to Morse code and decode it back, hear it as adjustable-speed sound with a visual flasher, and read the full Morse alphabet, number, and punctuation chart.