Choose the shift and type your message. Each letter moves that many places along the alphabet: with a shift of 3, A becomes D and HELLO becomes KHOOR. To read a message when you don’t know the shift, choose Decode and tick Show all 25. If the original was an English message in the letters A to Z, coded with a Caesar shift, one line will read as English; a message in another language reads in that language. Only letters change; numbers and punctuation stay as they are.
How the Caesar cipher works
Write the alphabet, then write it again moved along by the shift. With a shift of 3, every A in the message becomes D, every B becomes E, and at the end of the alphabet it wraps around: X becomes A, Y becomes B, Z becomes C. To decode, move each letter back by the same number. The two rows of letters below the result show the swap for the shift you chose. Only letters move: numbers, spaces and punctuation stay as they are, so HELLO XYZ 123 becomes KHOOR ABC 123.
ROT13 is the Caesar cipher with a shift of 13. Because the alphabet has 26 letters, doing it twice brings you back to the start, so the same step both codes and decodes.
Why it’s called the Caesar cipher
The Roman writer Suetonius, in his life of Julius Caesar, says that Caesar wrote confidential messages in a cipher in which each letter was replaced by the one three places later: D for A, and so on through the alphabet. That is a Caesar cipher with a shift of 3.
Make a cipher wheel
- Press Print a cipher wheel and print the page.
- Cut out both wheels. Put the small one on top of the big one.
- Push a paper fastener through both centers so the small wheel turns.
- Turn it to set the shift: with A on the outside over D on the inside, each outside letter codes to the inside letter below it.
Is it a safe way to hide a message?
No. There are only 25 possible shifts, so anyone can try them all, which is exactly what the decoder does. It’s a great puzzle and a good first lesson in how codes work, but never use it for passwords or private information.
Ideas for class
- An escape-room clue: code the next room’s instructions, or the word for a word lock, with a shift the students must find. The cipher changes only letters, so for a number lock, write the code as words first: 4-2-7 becomes FOUR TWO SEVEN.
- A history lesson on Rome, with the cipher Suetonius describes.
- A math link: shifting letters is counting forward in a loop of 26, like a clock with 26 hours.
Related guides
Your messages stay with you
Everything happens in your browser. What you type is kept in this browser’s storage so it’s there next time, and it’s never sent to us.
Questions
How do you decode a Caesar cipher?
Move each letter back by the shift used to code it: with a shift of 3, D becomes A and KHOOR becomes HELLO. If you don’t know the shift, choose Decode and tick Show all 25. There are only 25 shifts, so when the original message was English, written in the letters A to Z and shifted with a Caesar cipher, one of the lines will read as English. A message in another language decodes to that language.
How do you write a message in a Caesar cipher?
Pick a shift from 1 to 25 and swap each letter for the one that many places later in the alphabet, wrapping around after Z: with a shift of 3, HELLO becomes KHOOR and XYZ becomes ABC. In the tool, choose Encode, set the shift and type your message.
What is ROT13?
ROT13 is the Caesar cipher with a shift of 13. The alphabet has 26 letters, so doing it twice brings every letter back to where it started, which means the same step both codes and decodes. Press Use ROT13 (shift 13) to switch to it.
Final Takeaway
A Caesar cipher decoder moves each letter back by the shift that coded it, and when the shift is unknown, it shows all 25 so you can spot the one in plain words. ROT13, shift 13, codes and decodes in the same step.
Only the letters A to Z move, so write a number-lock code as words before you code it. Print the cipher wheel for hands-on practice, and keep the cipher for puzzles: with only 25 shifts to try, it can’t protect passwords or private information.
Main Sources
- Suetonius, The Lives of the Caesars: The Deified Julius, chapter 56. Loeb Classical Library translation (1913), on Bill Thayer’s LacusCurtius site.