Caesar Cipher & ROT13 Generator
Encrypt or decrypt text with a Caesar cipher (choose your own shift amount) or ROT13. Only letters are shifted — numbers, symbols, and other characters are left untouched. Conversion happens entirely in your browser; nothing you enter is sent to a server.
| Shift amount (0-25) | |
|---|---|
| Mode |
|
Copied!
What are Caesar ciphers and ROT13?
The Caesar cipher is one of the oldest and simplest ciphers, replacing each letter with one a fixed number of positions further along the alphabet. With a shift of 3, for instance, A becomes D and B becomes E (wrapping back to A after Z). ROT13 is a special case of the Caesar cipher with the shift permanently fixed at 13 — exactly half of the 26-letter alphabet — which gives it the handy property that applying the same transformation a second time returns the original text (encryption and decryption are the same operation).
Tips
- ROT13 has long been used on internet forums and message boards as a light obfuscation to hide spoilers or answers from anyone who doesn't want to see them yet. It's not real security — just a way to keep something from catching your eye by accident.
- A shift of 26 produces text identical to the input, since it cycles the 26-letter alphabet exactly once around. A shift of 0 behaves the same way.
- In "Decrypt" mode, entering the same shift amount used during encryption restores the original plaintext. You can flip between modes without changing the shift to see how it behaves.
- Uppercase and lowercase letters are shifted independently and keep their case (encrypting A gives D, encrypting a gives d — the case itself never changes).
Frequently Asked Questions
Side Note — why it's named after Caesar
The Caesar cipher takes its name from Julius Caesar, the ancient Roman statesman and general, who is said to have actually used this method to protect military communications. The Roman historian Suetonius, in his "Lives of the Twelve Caesars," records that Caesar used a shift of three letters in his correspondence with friends.
Its strength as a cipher is negligible by modern standards, but the underlying idea — substituting letters according to a fixed rule — carries historical significance as the ancestor of more sophisticated classical ciphers that followed, such as general substitution ciphers (with a more complex letter-mapping) and the Vigenère cipher (which combines multiple shift amounts).
The Caesar cipher is often the very first cipher introduced in cryptography textbooks, precisely because it's an excellent teaching tool: it lets you grasp fundamental concepts — plaintext, ciphertext, key (the shift amount, in this case), and brute-force attacks — intuitively, without needing complex mathematics.