Caesar Cipher
The Caesar cipher is a substitution cipher that shifts each letter a fixed number of positions in the alphabet. Named after Julius Caesar, who reportedly used a shift of 3, it is the simplest classical cipher and the basis for ROT13. While trivially breakable today, it teaches the core concepts of encryption: plaintext, ciphertext, key, and substitution.
Input
Encrypted
About the Caesar Cipher Encoder & Decoder
The Caesar cipher is a substitution cipher that shifts each letter a fixed number of positions in the alphabet. Named after Julius Caesar, who reportedly used a shift of 3, it is the simplest classical cipher and the basis for ROT13. While trivially breakable today, it teaches the core concepts of encryption: plaintext, ciphertext, key, and substitution.
How to use it
- Enter text to encrypt or decrypt.
- Set the shift amount (1–25). Caesar himself used 3; ROT13 uses 13.
- Choose encoding direction: encrypt (shift forward) or decrypt (shift backward).
- Use brute-force mode to see all 25 possible shifts — useful for decoding without knowing the key.
Formula & methodology
Encryption: C = (P + shift) mod 26. Decryption: P = (C − shift + 26) mod 26. ROT13 is self-inverse: ROT13(ROT13(x)) = x. Letter frequency analysis: most common ciphertext letter likely corresponds to E (12.7%), T (9.1%), A (8.2%) in English — enables trivial cracking.
Common use cases
- Introduction to cryptography concepts in computer science courses
- ROT13: traditional Usenet/forum practice for hiding spoilers
- Puzzle design: escape rooms, treasure hunts, puzzles
- Demonstrating why simple substitution ciphers are insecure
- Historical study of Roman and wartime cryptography
Frequently asked questions
Related tools
Related tools
All Tools →Embed this tool on your site
Free for personal and commercial use. Just copy the snippet below.