Caesar Cipher
Shift every letter by a chosen amount (1–25) to encode or decode messages with the classic Caesar cipher.
What Is Caesar Cipher?
A Caesar cipher encoder/decoder shifts each letter in your text forward (or backward) by a specified number of positions in the alphabet. With a shift of 3 — the shift Julius Caesar reportedly used — A becomes D, B becomes E, Z wraps around to C. The decoder reverses the operation: shift backward by the same amount to recover the original text. The cipher is named for Julius Caesar, who according to Suetonius used it to protect military communications.
The Caesar cipher is historically significant as one of the earliest documented encryption systems and remains a fundamental example in cryptography education. It introduces the core concept of substitution ciphers, where each plaintext character maps to exactly one ciphertext character via a fixed rule. Despite being completely insecure against modern techniques (there are only 25 possible keys to try), it's the starting point for understanding ROT13, the Vigenère cipher, and the principles that underlie modern encryption.
See also: ROT13 Encoder, Morse Code Translator, Binary Code Translator, Leet Speak Generator
Hello World→Khoor Zruog (shift 3)Who Should Use This Tool?
Learn and teach the fundamental concepts of substitution ciphers, encryption keys, and cipher breaking using the simplest historical example.
Encode messages with a specific Caesar shift for puzzle challenges where finding the shift value is part of the puzzle.
Explore classical cryptography by encoding and decoding messages with different shift values to understand how ancient encryption worked.
Key Use Cases
- →Encode puzzle clues and secret messages with a specific shift for escape rooms, scavenger hunts, and puzzle boxes.
- →Demonstrate basic encryption concepts to students by encoding a message and having them find the shift by frequency analysis.
- →Decode Caesar cipher challenges in CTF (Capture The Flag) competitions or cryptography puzzle exercises.
- →Create historical re-enactment content using the same ROT3 shift that Julius Caesar reportedly used.
- →Generate a series of encoded clues for a treasure hunt where each clue reveals the shift for the next.
How to Use Caesar Cipher
- Paste or type your text into the Input Text box.
- The result appears instantly on the right.
- Click Copy to copy the output to your clipboard.
- Click Clear to reset and process new text.
Common Mistakes & Pro Tips
- !Using the Caesar cipher for any real security need — with only 25 possible shifts (ROT1 through ROT25), an attacker can try all possibilities in under a minute manually, or in milliseconds computationally. The cipher provides no real security even against casual attackers.
- !Forgetting that shift direction matters for decoding — a message encoded with shift +3 must be decoded with shift -3 (or equivalently shift +23, since 26-3=23). If your decoder gives nonsense, try the complementary shift.
Frequently Asked Questions
Everything you need to know about Caesar Cipher
How many possible Caesar cipher keys are there?
+
There are only 25 non-trivial keys (shifts 1 through 25). Shift 0 leaves the text unchanged; shift 26 is the same as shift 0. An attacker can try all 25 possible shifts in seconds — this is called brute force attack and works for any cipher with a small key space. This makes the Caesar cipher completely insecure as a real encryption method but valuable as a learning tool for understanding cipher mechanics.
How would you break a Caesar cipher you received?
+
Two methods: (1) Brute force — try all 25 shifts and see which produces readable English. With short messages, this takes seconds mentally or milliseconds computationally. (2) Frequency analysis — the most common letter in English is E (12.7%). Find the most frequent letter in the ciphertext; the shift that maps it to E is likely the key. For a ciphertext where H appears most frequently, shift = H − E = 7. This generalizes to all monoalphabetic substitution ciphers.
What shift did Julius Caesar actually use?
+
According to Suetonius in "The Twelve Caesars" (written ~121 AD), Julius Caesar used a shift of 3 — encrypting A as D, B as E, and so on. His nephew Augustus Caesar reportedly used a shift of 1 (or sometimes shifted letters in a different pattern). Historical documentation of the exact usage is limited to these accounts; no encrypted Caesar cipher messages from antiquity survive. The name "Caesar cipher" refers to this family of ciphers, with shift 3 being the canonical "Julius Caesar" variant.
How is the Caesar cipher different from ROT13?
+
ROT13 is a Caesar cipher with a fixed shift of 13. The Caesar cipher generalization allows any shift from 1 to 25. ROT13 is special because its shift (13) is exactly half of 26, making it self-inverse — encode twice to get the original. Caesar cipher with any other shift requires knowing the specific shift value for decoding. ROT13 is the specific case; Caesar cipher is the general family of single-shift letter rotation ciphers.
Are there more secure variations of the Caesar cipher?
+
Yes — extending the Caesar cipher concept leads to more complex ciphers. The Vigenère cipher uses multiple shift values (a keyword) that cycle through the message, making frequency analysis harder. The one-time pad uses a truly random key as long as the message, which is theoretically unbreakable. Modern symmetric encryption (AES) can be conceptually understood as an extremely complex substitution and permutation structure — the Caesar cipher is the ancestral starting point of this lineage.
Related Tools
Last reviewed: August 2026