Caesar cipher online – encoder/decoder
Caesar cipher encoder and decoder online. Set a shift from 1–25, use the alphabet table and learn from examples how to solve the cipher.
Did Caesar really use this cipher?
What is the Caesar cipher?
The Caesar cipher is a simple substitution cipher in which every plaintext letter is replaced by a letter a fixed number of positions away in the alphabet. That number is the key used to encrypt and recover the message.
How does the shift work?
For every letter, move through the alphabet by the number of positions specified by the key. After Z, continue again from A. With a key of 3, A becomes D, B becomes E, and X wraps around to A.
Example with a key of 3
Shifting every letter of “REBUS” by 3 produces “UHEXV”: R→U, E→H, B→E, U→X and S→V. You can reproduce this example with the working tool above.
Complete alphabet table for a key of 3
The top row contains plaintext letters and the bottom row contains their replacements. The table uses the 26-letter Latin alphabet supported by the tool.
| Plaintext | 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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Ciphertext | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C |
How do you decrypt the text?
Decryption moves in the opposite direction. If the message was encrypted with a key of 3, move every ciphertext letter back by 3 places. U becomes R, H becomes E, and moving before A wraps around to the end of the alphabet.
ROT13 and the Caesar cipher
ROT13 is a special Caesar shift of 13 places. Because the Latin alphabet has 26 letters, applying ROT13 a second time restores the original text. It is useful for obscuring spoilers or punchlines, not for protecting data.
How can the Caesar cipher be broken?
With the Latin alphabet, an attacker only needs to test the 25 non-zero shifts and select the result that resembles real language. Letter-frequency analysis also helps with longer messages, so the method should never secure private information.
Why is the Caesar cipher insecure?
Its key space is tiny, identical letters always produce identical output, and recognizable language frequencies and patterns remain visible. A modern computer can test every possible shift almost instantly.
See also: Vigenère cipher · AES‑256‑GCM cipher
History of the Caesar cipher
The method is named after Julius Caesar, who is associated with using a shifted alphabet in military correspondence. Today the Caesar cipher is mainly used as an accessible introduction to cryptography and modular arithmetic.
Caesar cipher wheel to print
An A4 sheet with two wheels to cut out and assemble, plus short instructions. Useful for cipher lessons and learning at home.