The arithmetic behind the shift
Number the alphabet from A = 0 to Z = 25. Encrypting a letter x with key k gives (x + k) mod 26, and decrypting gives (x − k) mod 26. The mod 26 wraps the alphabet into a circle, so with a shift of 3 the letter Y (24) becomes 27 mod 26 = 1, which is B.
Plain: H E L L O
Number: 7 4 11 11 14
+3: 10 7 14 14 17
Cipher: K H O O R
This tool keeps capitals as capitals and leaves digits, spaces and punctuation alone. Accented letters such as é are also left unchanged, since the cipher is defined only over the 26 basic Latin letters.
What Suetonius recorded
The Roman biographer Suetonius wrote that Julius Caesar replaced each letter with the one three places further along. He also reported that Augustus used a shift of one and, oddly, wrote AA in place of X instead of wrapping around. Both accounts date from the second century, more than 150 years after Caesar died.
Breaking one without the key
A shift of 0 or 26 changes nothing, which leaves just 25 useful keys. Press Show all shifts on this page and scan the list for the one line that reads as a language. That exhaustive approach is called a brute-force attack, and for this cipher it takes seconds by hand.
Frequency analysis needs even less effort on longer text. The ninth-century scholar Al-Kindi described counting how often each symbol appears and matching the counts to the known habits of a language. In English, E is the most common letter, so if a long ciphertext is full of H, a shift of 3 is the first thing to try.
ROT13 and its one useful trick
Since 13 is exactly half of 26, a shift of 13 undoes itself: applying it twice returns the original. Usenet readers adopted ROT13 in the 1980s to hide spoilers and punchlines from anyone who had not chosen to decode them. It conceals text from a casual glance and protects nothing.
The Vigenère cipher is the classic attempt to fix the weakness, using a keyword so that each letter gets a different Caesar shift. For real privacy today, use modern authenticated encryption such as AES-GCM, and treat this page as a way to learn or to set a puzzle.