Substitution cipher

A simple substitution cipher replaces each letter using one fixed scrambled alphabet. Enter a keyword and the alphabet starts with its letters, followed by the unused rest of A to Z; enter all 26 letters to define the replacement alphabet exactly.

Break without the key

Paste substitution ciphertext with an unknown alphabet and the solver recovers it by hill climbing: it swaps letter pairs and keeps every change that makes the text score more like English quadgram statistics. It works best with a hundred letters or more.

About substitution ciphers

A monoalphabetic substitution cipher replaces every A with the same chosen letter, every B with another, and so on through the alphabet. With 26 letters there are about 4 × 10²⁶ possible alphabets, far too many to try one by one, which made the cipher feel safe for over a thousand years.

The Arab scholar Al-Kindi showed the flaw in the 9th century: the disguise never changes, so the letter frequencies of the language show straight through. In English text E, T, and A dominate; whichever symbols dominate the ciphertext almost certainly stand for them. With a few dozen words of ciphertext, frequency analysis and pattern words break any simple substitution, no matter how scrambled the alphabet.