Caesar Cipher
Caesar Cipher – Shift every letter along the alphabet to hide a message, then shift it back to read it. Pick a shift from 1 to 25 (3 is Caesar's own, 13 is ROT13), or list every shift to crack a message.
How to use the Caesar cipher tool
- Type your message and choose a shift. With shift 3, A becomes D and B becomes E.
- Copy the encoded text and send it.
- To decode, press ⇄ Swap direction and use the same shift.
- Don't know the shift? Press Show all 25 shifts and look for the line that makes sense.
Worked example
With a shift of 3: HELLO → KHOOR.
| Plain | A | B | C | X | Y | Z |
|---|---|---|---|---|---|---|
| Shift 3 | D | E | F | A | B | C |
The alphabet wraps around: after Z comes A again.
History of the Caesar cipher
The Roman historian Suetonius wrote that Julius Caesar protected private letters by replacing each letter with the one three places further down the alphabet. That's why it carries his name.
ROT13, a shift of 13, became popular on early internet forums for hiding spoilers and puzzle answers. Because the alphabet has 26 letters, applying ROT13 twice gives back the original.
How to crack a Caesar cipher
- Brute force: there are only 25 possible shifts, so you can try them all in seconds.
- Letter frequency: E is the most common letter in English. If H appears most often in the code, the shift is probably 3.
- Short words: a one-letter word is almost always A or I.
Is the Caesar cipher secure?
No. It is fun for puzzles, escape rooms, geocaching and teaching, but anyone can break it in seconds. Never use it to protect passwords or private data. Use proper encryption, such as your password manager or end-to-end encrypted messaging.
Frequently asked questions
What is ROT13?
A Caesar cipher with a shift of 13. Encoding and decoding are the same operation.
Does the cipher change numbers?
No. The classic Caesar cipher only shifts letters. Numbers, spaces and punctuation stay the same.
How many keys does a Caesar cipher have?
25 useful shifts. A shift of 26 (or 0) gives the original text.
What is the difference between a Caesar and a Vigenère cipher?
A Caesar cipher uses one shift for every letter. Vigenère uses a keyword, so the shift changes from letter to letter.