Caesar Cipher
Encode or decode messages with the Caesar cipher. Shift by any amount, and brute-force all 25 shifts. 100% client-side.
🏛️ Historical note
Julius Caesar reportedly used a shift of 3 for his private correspondence (Suetonius, "Life of Julius Caesar"). The cipher is named after him and is the earliest known example of a substitution cipher with a fixed key. It is the basis of many modern cryptography lessons — because it perfectly demonstrates the principle of a shift cipher while being simple enough to break by hand.
About Caesar Cipher
The Caesar cipher is one of the earliest known and simplest encryption techniques. It is a substitution cipher in which each letter in the plaintext is shifted a fixed number of positions down the alphabet. Julius Caesar reportedly used a shift of 3 to protect military messages around 58 BC. For example, with shift 3, "ATTACK" becomes "DWWDFN". Because there are only 26 possible shifts, the Caesar cipher offers no real security — it can be broken in seconds by trying all 25 shifts (brute-force) or by frequency analysis. This tool lets you encode or decode with any shift, and shows all 25 possible outputs so you can quickly spot the correct one.
How It Works
- Enter your message in the input box.
- Choose a shift amount (1–25) or use the slider.
- Click Encode to shift forward, or Decode to shift backward.
- See all 25 possible shifts in the brute-force panel below.
✨ Key Features
- ✓Encode with any shift (1–25)
- ✓Decode with the opposite shift
- ✓Interactive slider for shift amount
- ✓Preserves uppercase and lowercase letters
- ✓Non-letter characters (spaces, punctuation, digits) unchanged
- ✓Brute-force panel — all 25 shifts shown at once
- ✓Copy any shift output with one click
- ✓History of recent shifts tried
- ✓Common shift presets (ROT13, +3 Caesar, etc.)
- ✓100% client-side — no data sent to any server
🎯 Common Use Cases
- →Learning about classical ciphers and cryptography
- →Decoding Caesar cipher puzzles or CTF challenges
- →Encrypting simple messages for fun
- →Teaching cryptography fundamentals
- →Cracking simple shift ciphers in escape rooms
- →Understanding the basis of ROT13
- →Creating puzzle content
- →Comparing Caesar cipher with modern ciphers
💡 Advanced Tips & Pro Insights
- ▸The Caesar cipher is a special case of the affine cipher with a=1. It is trivially broken — a Caesar ciphertext has only 25 possible plaintexts.
- ▸ROT13 is a Caesar cipher with shift 13. Because 13 is half of 26, it is self-inverse: encoding and decoding use the same operation.
- ▸Caesar shift 3 is the classic historical shift — Julius Caesar reportedly used it. It is also the shift used in the famous "SOS" example... though SOS as Morse is different.
- ▸Frequency analysis breaks any Caesar cipher instantly: in English, "E" is the most common letter. If the most common letter in a Caesar ciphertext is "X", then the shift is likely X-E = 19.
- ▸The Caesar cipher does NOT encrypt digits, punctuation, or spaces — this limits its usefulness even for toy encryption.