How to use the Caesar cipher tool
- Type or paste your text into the box at the top.
- Set the shift with the slider (1-25), or click ROT13 to jump straight to the classic shift of 13.
- Choose Encode or Decode. Encode shifts letters forward, Decode shifts them back by the same amount, both use the same shift value.
- Copy the result once it looks right, or open "Don't know the shift?" to see all 25 possible outputs at once and pick out the one that reads as real words.
What is a Caesar cipher?
The Caesar cipher is one of the oldest encryption methods on record, named after Julius Caesar, who is said to have used it to protect military messages by shifting each letter a fixed number of places through the alphabet. With a shift of 3, A becomes D, B becomes E, and so on, wrapping back to the start once the shift runs past Z. It is a substitution cipher: every letter is swapped for another letter a consistent distance away, and the same shift run in reverse restores the original text. Centuries later it is no longer used to protect anything sensitive, but it remains a favorite first example for teaching how ciphers work, and it still shows up in puzzles, escape rooms and programming exercises.
How the shift works
Each letter is treated as a position in the alphabet (A or a = 0, up to Z orz = 25), the shift is added to that position, and the result wraps around using modulo 26 so it always lands back inside the alphabet. Uppercase and lowercase letters are shifted independently within their own 26-letter range, so case is always preserved, shifting "Zebra" by 1 gives "Afcsb", not"afcsb" or something with the case scrambled. Anything that is not an English letter, spaces, digits, punctuation, accented characters, emoji, passes through completely untouched, only A-Z anda-z are ever moved.
Encoding and decoding are the exact same operation with the shift sign flipped: shifting forward by N to encode is undone by shifting backward by N (equivalently, forward by 26 - N) to decode. That is why this tool uses a single shift value for both directions, pick the number once, then use Encode or Decode as needed, and the two always cancel out to return your original text exactly.
ROT13, the special case everyone has seen
ROT13 is simply a Caesar cipher with the shift fixed at 13. Because the alphabet has exactly 26 letters, 13 is halfway around, which makes ROT13 self-inverse: running the same ROT13 operation on a message twice returns the original text, so encoding and decoding use the identical action. That property made it popular decades ago on early internet forums for lightly obscuring spoilers, punchlines or puzzle answers so they were not readable at a glance, without needing separate encode and decode steps.
Why it is not secure
To be clear, a Caesar cipher provides essentially no real security by modern standards, and this tool is meant for puzzles, learning and nostalgia, not for protecting anything you actually need to keep private. There are only 25 possible shifts, so a message can be broken in seconds simply by trying every one of them, which is exactly what the brute-force view above does for you. Even without brute-forcing every option, the fixed letter-for-letter substitution means the frequency of letters in the ciphertext still matches the frequency of letters in normal English, so it also falls quickly to basic frequency analysis. If you need to keep something genuinely private, use a real encryption tool, not a shift cipher.
Frequently asked questions
What is a Caesar cipher?
It is a simple substitution cipher that shifts every letter a fixed number of places through the alphabet. The same shift applied in reverse decodes the message.
Is ROT13 the same as a Caesar cipher?
Yes. ROT13 is a Caesar cipher with a shift of exactly 13. Because the alphabet has 26 letters, applying ROT13 twice returns the original text, which is why it needs only one button.
Is a Caesar cipher secure?
No. There are only 25 possible shifts, so it can be broken in seconds by trying all of them or by frequency analysis. Treat it as a puzzle or novelty tool, not real encryption.
How do I decode a message if I do not know the shift?
Paste it into the box and open the brute-force view, it lists all 25 possible shifts at once so you can spot the one that reads as plain English.
Does it handle uppercase, lowercase, numbers and punctuation correctly?
Yes. Uppercase and lowercase letters are each shifted within their own 26-letter range, and anything that is not a letter, spaces, digits, punctuation, accents, emoji, is left exactly as typed.
Related: Morse code translator · all text tools.