How to use the Caesar Cipher Encoder & Decoder
- Type or paste your text in the box.
- Choose a shift (the key) from 1 to 25, and Encode or Decode.
- Read the result on the right. Capitals, spaces, digits and punctuation stay as they are.
- To crack a message, look at All shifts: the one that reads as English is marked as the best guess.
How the Caesar cipher works
Each letter moves a set number of places along the alphabet, wrapping round from Z to A. With a shift of 3, A becomes D, B becomes E, and X becomes A:
Plain: 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 Shift 3: 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
HELLO becomes KHOOR. To decode, shift back by the same amount, or forward by 26 minus the key.
Why it's easy to break
There are only 25 possible keys, so anyone can try them all, which is exactly what the All shifts list does. To pick the right one automatically, each attempt is scored on how closely its letter frequencies match English, where E, T, A and O are the most common letters. That's why the Caesar cipher is for puzzles, games and teaching, never for real secrets.
History
Julius Caesar used a shift of 3 for his private letters, according to the Roman historian Suetonius. A shift of 13 is called ROT13; it's its own inverse, so the same step both hides and reveals the text.
Frequently asked questions
What shift did Caesar use?
A shift of 3, so A was written as D.
How do I decode without the key?
Look at the All shifts list. With 25 options, the readable one stands out, and the best guess is marked for you.
Does it keep capitals and punctuation?
Yes. Upper and lower case are kept, and anything that isn't A–Z, like digits, spaces and punctuation, is left unchanged.
What's the difference between ROT13 and Caesar?
ROT13 is a Caesar cipher with a shift of 13. Because the alphabet has 26 letters, applying it twice gives back the original.
Updated