Caesar Cipher Examples — Encode & Decode with Any Shift
By Letters2NumbersConverter.com | May 13, 2026
The best way to understand the Caesar cipher is to work through real examples. This guide covers step-by-step encoding and decoding for the most commonly used shifts — 3 (the classical Caesar), 7, 13 (ROT13), and 21 — complete with full alphabet tables and worked letter-by-letter breakdowns. If you want to encode or decode text right now, use our free Caesar Cipher Decoder.
How the Caesar Cipher Works
To encode a message, replace each letter with the letter a fixed number of positions later in the alphabet. When you reach Z, wrap back around to A. To decode, shift in the opposite direction by the same amount. The shift value is the cipher's key — both sender and recipient must know it.
The formula: encoded_position = (plain_position + shift) mod 26, where positions run from 0 (A) to 25 (Z).
Example 1: Caesar Cipher Shift 3 (The Classical Caesar)
Shift 3 is the original cipher used by Julius Caesar for his military dispatches.
| Plain | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z |
| Cipher | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C |
Encoding "HELLO WORLD" with Shift 3
H (pos 7) + 3 → pos 10 → K
E (pos 4) + 3 → pos 7 → H
L (pos 11) + 3 → pos 14 → O
L (pos 11) + 3 → pos 14 → O
O (pos 14) + 3 → pos 17 → R
W (pos 22) + 3 → pos 25 → Z
O (pos 14) + 3 → pos 17 → R
R (pos 17) + 3 → pos 20 → U
L (pos 11) + 3 → pos 14 → O
D (pos 3) + 3 → pos 6 → G
Result: HELLO WORLD → KHOOR ZRUOG
Decoding "WKH HDJOH KDV ODQGHG" with Shift 3
To decode, shift back by 3 (or equivalently, shift forward by 23):
WKH HDJOH KDV ODQGHG → THE EAGLE HAS LANDED
Example 2: Caesar Cipher Shift 7
Shift 7 was historically used in puzzle design and is a common choice for escape room clues because it produces less recognisable patterns than shift 3.
| Plain | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z |
| Cipher | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G |
Encoding "SECRET MESSAGE" with Shift 7
Letter-by-letter:
S → Z
E → L
C → J
R → Y
E → L
T → A
M → T
E → L
S → Z
S → Z
A → H
G → N
E → L
Result: SECRET MESSAGE → ZLJYLA TLZZHNL
Decoding a Shift-7 Ciphertext
TLLA HA KHDU decoded with shift 7 → MEET AT DAWN
Example 3: Caesar Cipher Shift 13 (ROT13)
Shift 13 is special: because 13 × 2 = 26, encoding and decoding are identical operations. This is ROT13 — used for Reddit spoilers and Usenet posts. See our full guide: Caesar Cipher Shift 13 explained.
| Plain | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z |
| Cipher | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M |
Encoding "SPOILER ALERT" with Shift 13
SPOILER ALERT → FCBVYRE NYREG
Apply shift 13 again to decode: FCBVYRE NYREG → SPOILER ALERT. Same operation, same result.
Example 4: Caesar Cipher Shift 21 (Reverse Caesar)
Shift 21 is equivalent to shifting backwards by 5 (since 26 − 21 = 5). It is sometimes called a "reverse" or "negative 5" Caesar, and appears in some puzzle books.
| Plain | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z |
| Cipher | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U |
Encoding "FIND THE KEY" with Shift 21
FIND THE KEY → ADIY OCZ FZT
To decode, shift forward by 5: ADIY OCZ FZT → FIND THE KEY.
Multi-Word Encoding Examples
Spaces and punctuation pass through unchanged in all Caesar cipher variants.
| Plain text | Shift | Ciphertext |
|---|---|---|
| The quick brown fox | 3 | Wkh txlfn eurzq ira |
| Attack at midnight | 13 | Nggnpx ng zvqavtug |
| I love cryptography | 7 | P svcl jyfwavnyhwof |
| Caesar was here | 21 | Xvznvm rvn czmz |
| Escape room puzzle | 5 | Jxhfuj wttr uzeeqj |
| Hidden message here | 17 | Yzuuve dvjjrxv yviv |
How to Decode Without Knowing the Shift
If you receive a Caesar-encoded message and don't know the shift, you have two options:
Option 1: Brute Force (Try All 25 Shifts)
There are only 25 possible Caesar shifts. Our Caesar Cipher Decoderhas a "Show all 25 shifts" mode that displays every possible decoded version simultaneously, ranked by English-language likelihood — the correct shift is almost always at the top.
Option 2: Frequency Analysis
In English text, E is the most common letter (~12.7% frequency), followed by T, A, O, I, N. Find the most frequent letter in the ciphertext — it is most likely E. The difference between its position and E's position (5) gives you the shift. For a full walkthrough, read our guide to cracking the Caesar cipher.
Practise With These Puzzles
Can you decode these? Paste them into our Caesar Cipher Decoder and use brute-force mode to find the answers.
Puzzle 1 (Shift 11)
ESP ECPLDFCP TD MFCTPO FYOPC ESP ZLV ECPP
Puzzle 2 (Shift 19)
DGHPEXWZX BL IHPXK
Puzzle 3 (Shift 4)
XS FI SV RSX XS FI XLEX MW XLI UYIWXMSR
Frequently Asked Questions
What is the most common Caesar cipher shift?
Shift 3 is the most historically famous — it is what Julius Caesar himself used. In modern puzzle design, shifts of 13 (ROT13), 7, and 17 are also common choices.
Can the Caesar cipher use letters as the key?
Sometimes the key is expressed as a letter rather than a number — the letter indicates how many positions to shift. For example, key "D" means shift 3 (D is the 4th letter, counting from A=0 or A=1 depending on convention). Always check which convention a puzzle uses.
Does the Caesar cipher work on lowercase letters?
Yes — our tool preserves case. Uppercase letters encode to uppercase; lowercase to lowercase. The shift arithmetic is the same in both cases.
Encode or Decode Any Caesar Cipher Now
Our free Caesar Cipher Decoder & Encoder handles any shift from 1 to 25 — paste your text, drag the slider, and get the result instantly. The brute-force panel shows all 25 shifts at once, ranked by English likelihood, so you can crack any Caesar cipher even without knowing the key.
Related tools: ROT13 Decoder (Caesar shift 13) · Cipher Identifier · Cryptogram Solver