About classical ciphers
Classical ciphers are historical encryption methods that predate modern cryptography. While none of them are secure for protecting sensitive data today, they are invaluable for understanding the foundations of cryptography and are widely used in puzzles, CTF (Capture The Flag) challenges, escape rooms, and education.
| Cipher | Type | Key | Invented | Security |
|---|---|---|---|---|
| Caesar | Substitution | Shift 1–25 | ~100 BC | Trivially broken (only 25 possibilities) |
| ROT13 | Substitution | Fixed shift 13 | 1980s (Usenet) | No security — obfuscation only |
| Vigenère | Polyalphabetic | Keyword | 1553 | Broken by Kasiski analysis (1863) |
| Atbash | Substitution | None | ~600 BC | No security — single fixed mapping |
| Rail Fence | Transposition | Rail count | Civil War era | Trivially broken by brute-force |
| Morse code | Encoding | None | 1838 | Not a cipher — encoding only, no secrecy |
Caesar cipher
The Caesar cipher shifts every letter of the alphabet by a fixed number of positions. Named after Julius Caesar who used a shift of 3, it is the simplest substitution cipher. For example with shift 3: A → D, B → E, Z → C.
How to use: Set the shift slider (1–25), type your message, and click Encrypt. To decrypt a ciphertext without knowing the shift, click Brute-force all shifts — the tool tries all 25 possibilities and ranks them by how closely the letter frequency matches English. Click any row in the results table to apply that shift.
Example: "Hello" with shift 3 → "Khoor". "Khoor" decrypted with shift 3 → "Hello".
ROT13
ROT13 is a special case of Caesar with a fixed shift of 13. Because the alphabet has 26 letters, applying ROT13 twice returns the original text — making it its own inverse. It was popularised on Usenet in the 1980s to hide spoilers and punchlines.
How to use: Paste any text and click ROT13. Clicking again on the output will restore the original. There is no key — ROT13 provides no real security.
Example: "Hello World" → "Uryyb Jbeyq". "Uryyb Jbeyq" → "Hello World".
Vigenère cipher
The Vigenère cipher uses a keyword to apply a different Caesar shift to each letter of the message, cycling through the keyword. This makes frequency analysis harder than a simple Caesar cipher since the same plaintext letter may encrypt to different ciphertext letters depending on its position.
How to use: Enter a keyword (letters only, e.g. SECRET), type your message, then click Encrypt or Decrypt. The same keyword must be used for both operations. The frequency chart will show a flatter distribution than Caesar, reflecting the polyalphabetic nature of the cipher.
Example: Message "ATTACK", key "SECRET" → shift A by S(18), T by E(4), T by C(2), A by R(17), C by E(4), K by T(19) → "SVCREE".
Atbash cipher
Atbash is one of the oldest ciphers, originating in Hebrew scripture (~600 BC). It simply reverses the alphabet: A maps to Z, B maps to Y, C maps to X, and so on. Like ROT13, it is its own inverse — encoding and decoding use the same operation.
How to use: Type your text and click Encode / Decode. Numbers, spaces, and punctuation are preserved unchanged. Applying the cipher twice restores the original text.
Example: "Hello" → H→S, E→V, L→O, L→O, O→L → "Svooh".
Rail Fence cipher
The Rail Fence cipher is a transposition cipher — it rearranges the letters of the message rather than substituting them. The plaintext is written in a zigzag pattern across a number of "rails" (rows), then read off row by row to produce the ciphertext.
How to use: Set the number of rails (2–10) using the slider, type your message, and click Encrypt. The tool also shows a visual rail diagram so you can see exactly how the letters are distributed across the rails. To decrypt, paste the ciphertext and click Decrypt with the same rail count. If you don't know the rail count, click Brute-force rails to try all values from 2 to 10.
Example with 3 rails: "WE ARE DISCOVERED" written in zigzag produces rails W...I...V.R, .E.R.E.I.C.E.E., ..A...S...O...D — read row by row → "WIVRERECEIEASOD".
Morse code
Morse code is not a cipher — it is an encoding scheme that represents each letter and digit as a sequence of dots (.) and dashes (-). Developed by Samuel Morse in 1838 for telegraph communication, it provides no secrecy since anyone can decode it. Letters within a word are separated by spaces, and words are separated by a slash (/) or pipe (|).
How to use: To encode, type plain text and click Text → Morse. To decode Morse, paste the dot-dash sequence (e.g. ... --- ...) and click Morse → Text. Choose your word separator (/ or |) using the radio buttons. The quick reference table at the bottom shows all letter and digit codes.
Example: "SOS" → ... --- .... "HELLO" → .... . .-.. .-.. ---.
Letter frequency analysis
In English, the most common letters 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%). The frequency chart displayed below each cipher shows the distribution of letters in your text (blue bars) compared to the English average (grey overlay).
For substitution ciphers like Caesar and Atbash, the frequency distribution is shifted but its shape is preserved — you can match the tallest bar in the ciphertext to E (the most common English letter) to guess the shift. For the Vigenère cipher, the distribution is flatter because multiple shifts are applied, which is why it resisted cryptanalysis for 300 years.
