How this instrument works
The Caesar cipher is the oldest substitution cipher still in everyday use, named for Julius Caesar, who is said to have used a shift of three to protect military messages. The idea is simple: pick a number, then slide every letter of the alphabet forward by that many places, wrapping from Z back around to A. Encrypting is just replacing each letter of your message with the letter that many places ahead of it, and decrypting is sliding the same distance backward.
Because it's a single formula, this instrument doesn't need separate encrypt and decrypt modes — it needs one shift value. A positive shift moves letters forward (encrypting), and a negative shift moves them backward by the same amount (decrypting). If a friend encrypted a message by shifting it forward 7 places, you decrypt it by entering -7, not by hunting for a separate "decrypt" button. Only the 26 letters A-Z and a-z move; digits, spaces, and punctuation pass through unchanged, and each letter keeps its original uppercase or lowercase form.
One shift value is special enough to have its own name: 13. Since the alphabet has 26 letters, shifting by 13 twice lands you back where you started, which makes ROT13 its own reverse — the same operation both encrypts and decrypts. That self-canceling property is why ROT13 shows up on forums and puzzle sites to lightly obscure spoilers, not to protect anything sensitive.
- Type or paste the text you want to shift into the Text field — letters, numbers, and punctuation are all accepted.
- Enter a shift amount between -25 and 25: a positive number encrypts by moving letters forward through the alphabet.
- Enter a negative number to decrypt — use the exact negative of the shift that was used to encrypt the message.
- Read Shifted text for the result. Case and non-letter characters are preserved exactly as you typed them.
- To try ROT13, set the shift to 13; running the result back through the tool with shift 13 again returns your original text.
Worked example — encrypting and decrypting with a Caesar shift
Take the text SKY with a shift of 5. Each letter's alphabet position (A=0) moves forward 5 places, wrapping past Z back to A when needed: S is index 18, so 18+5=23, which is X. K is index 10, so 10+5=15, which is P. Y is index 24, so 24+5=29, and 29 mod 26 wraps around to 3, which is D. SKY shifted by 5 becomes XPD.
To reverse a shift, use its negative. Shifting GTC by -5 subtracts 5 from each letter's index instead of adding it: G (index 6) minus 5 is 1, which is B; T (index 19) minus 5 is 14, which is O; C (index 2) minus 5 is -3, and -3 mod 26 wraps around to 23, which is X. GTC shifted by -5 becomes BOX — decrypting with this tool is nothing more than shifting the other way.
Shift 13 is the famous self-inverse case, ROT13. Hello, World! shifted by 13 becomes Uryyb, Jbeyq! — the comma, space, and exclamation point pass straight through, and the capital H and W stay capitalized in the output. Feed Uryyb, Jbeyq! back in with shift 13 again and you get Hello, World! right back.
Questions
How do I decrypt a Caesar cipher message with this tool?
Enter the negative of the shift used to encrypt it. If a message was encrypted with shift 7, decrypt it by entering -7 — the same Ci = (Pi + n) mod 26 formula runs backward and recovers the original letters. There's no separate decrypt mode because the math is identical in both directions; only the sign of n changes.
What is ROT13 and why is shift 13 special?
ROT13 is the Caesar cipher with shift fixed at 13. Because the alphabet has 26 letters and 13 is exactly half of that, applying ROT13 twice returns the original text — it's its own reverse. That's why forums and puzzle sites use it to lightly hide spoilers or answers: readers can decode it with the same tool they'd use to encode it, and no separate key ever needs to be shared.
Is the Caesar cipher actually secure?
No, not for anything that needs real protection. There are only 25 possible non-zero shifts, so a computer (or a patient person) can try every one in a fraction of a second until the output reads as plain English. Even without brute-forcing every shift, the cipher falls to frequency analysis, since the most common letter in the ciphertext almost always corresponds to E, the most common letter in English. Treat it as a puzzle or teaching tool, not a way to protect real secrets.
What happens to spaces, numbers, and punctuation when I shift text?
They're left exactly as you typed them. Only the 26 letters of the Latin alphabet (A-Z and a-z) are shifted; digits, spaces, commas, periods, and other symbols pass through unchanged, and each letter's uppercase or lowercase case is preserved independently of the others.
What if I don't know what shift was used to encrypt a message?
With only 25 possible shifts, you can simply try each one — enter shift values from 1 to 25 and see which produces readable text. For longer messages, frequency analysis speeds this up: count which letter appears most often in the ciphertext, assume it stands for E (the most common English letter), and the shift falls straight out of that pairing.
How is the Caesar cipher different from the Vigenère cipher?
The Caesar cipher shifts every letter by the same fixed amount, so it only has 26 possible keys total. The Vigenère cipher instead repeats a keyword across the message and shifts each letter by an amount that depends on the matching keyword letter, which resists simple frequency analysis far better. If you want that stronger, keyword-based version, use this site's Vigenère Cipher Calculator instead — the two tools share the same underlying shift-and-wrap math, just applied differently.