Skip to content
Toolcroft

Caesar Cipher - Encode, Decode & Brute-Force

Password & Security

Encode or decode Caesar ciphers with shifts 0–25, view letter frequencies, suggest an English-based shift, or compare all 25 ranked decryptions.

Letter frequency

English reference order: ETAOIN SHRDLU. E 12.7%, T 9.1%, A 8.2%, O 7.5%, I 7.0%, N 6.7%.

The hint maps the most common input letter to English E. It assumes English and is unreliable with fewer than 30 letters; a suggestion is not proof of a decode.

A0 · 0.0%Eng 8.2%
B1 · 6.3%Eng 1.5%
C1 · 6.3%Eng 2.8%
D0 · 0.0%Eng 4.3%
E1 · 6.3%Eng 12.7%
F1 · 6.3%Eng 2.2%
G0 · 0.0%Eng 2.0%
H1 · 6.3%Eng 6.1%
I1 · 6.3%Eng 7.0%
J0 · 0.0%Eng 0.2%
K1 · 6.3%Eng 0.8%
L0 · 0.0%Eng 4.0%
M0 · 0.0%Eng 2.4%
N1 · 6.3%Eng 6.7%
O2 · 12.5%Eng 7.5%
P0 · 0.0%Eng 1.9%
Q1 · 6.3%Eng 0.1%
R1 · 6.3%Eng 6.0%
S0 · 0.0%Eng 6.3%
T1 · 6.3%Eng 9.1%
U1 · 6.3%Eng 2.8%
V0 · 0.0%Eng 1.0%
W1 · 6.3%Eng 2.4%
X1 · 6.3%Eng 0.1%
Y0 · 0.0%Eng 2.0%
Z0 · 0.0%Eng 0.1%
Text size:
Gur Dhvpx Oebja Sbk

Cipher wheel · shift 13

ANBOCPDQERFSGTHUIVJWKXLYMZNAOBPCQDRESFTGUHVIWJXKYLZMshift13plaincipher

How to use this tool

  1. Enter your text. Paste or type the message you want to encode or decode.
  2. Set the shift. Choose a shift from 0 to 25 or select ROT13, Caesar 3, or +1. Encode applies E(x)=(x+n) mod 26; Decode reverses it.
  3. Choose a mode or suggest a shift. Encode moves letters forward, Decode reverses the shift, and Brute-Force All compares every shift from 1 to 25. Suggest shift maps the most common input letter to E using an English-only heuristic that is unreliable below 30 letters.
  4. Review and reuse the result. Compare the frequency chart or ranked brute-force candidates, then copy a result. Swap uses the current output as new input and reverses Encode or Decode; Clear empties the input.

What is the Caesar cipher?

The Caesar cipher is one of the oldest known encryption methods, named after Julius Caesar who reportedly used it for personal correspondence. It works by shifting every letter in the message forward (or backward) by a fixed number of positions in the alphabet. With shift 3, "A" becomes "D", "B" becomes "E", and "Z" wraps around to "C".

The calculation numbers letters from A=0 through Z=25. Encoding uses E(x) = (x + n) mod 26; decoding uses D(x) = (x - n) mod 26, where n is the shift. For example, a shift of 3 turns the value for A (0) into 3 (D). A shift of 0 leaves the text unchanged. The calculator lets you use 0–25 for direct encoding and decoding, while Brute-Force All lists the 25 nonzero shifts.

How to decode a Caesar cipher without the key

Use Brute-Force All to compare every nonzero decode shift. The rows are ranked by a chi-squared score that compares each candidate’s A–Z letter frequencies with typical English frequencies; lower scores are a closer statistical fit. All 25 candidates remain available with their numeric shift labels, and the top row is marked “Likely.” This ranking is only a clue: short or unusual messages can produce misleading results, so check the words and context before choosing a candidate.

Caesar cipher vs. ROT13

ROT13 is simply a Caesar cipher with a fixed shift of 13. Since 13 + 13 = 26 (the size of the English alphabet), ROT13 is self-inverse: applying it twice always returns the original text. It is commonly used to hide spoilers or puzzle answers online.

Security

The Caesar cipher provides no real security. It can be broken instantly by brute force (as demonstrated above) and is trivially defeated by frequency analysis. It is useful for educational purposes, puzzle games, and light text obfuscation, but not for protecting sensitive information. For actual secrecy, use modern encryption such as AES Encrypt/Decrypt and protect its key.

Frequency analysis

English letters appear with very unequal frequency. The top letters in order of frequency are E (12.7%), T (9.1%), A (8.2%), O (7.5%), I (7.0%), N (6.7%), S (6.3%), H (6.1%), R (6.0%). Because the Caesar cipher only shifts letters, it preserves these frequencies. In a ciphertext, a common first guess is that its most frequent letter encodes E. The tool’s Suggest shift button applies that one-letter heuristic with (most common cipher letter index - 4 + 26) mod 26, then opens Decode mode. The chart reports each input letter’s count and percentage beside the English reference rate, so you can see what the estimate uses. It assumes English and is unreliable with fewer than 30 letters; different topics, names, and non-English text can change the frequency pattern.

You can also set a named ROT13 (13), Caesar 3, or +1 preset. Swap puts the current output into the input and reverses Encode or Decode, making it easy to check an encode/decode round trip; it is unavailable in Brute-Force All. Clear empties the input, which also clears the result. These controls and all frequency calculations run in the browser on the text you enter.

Historical examples

Julius Caesar reportedly used a shift of 3 for his personal letters, according to Suetonius. His successor Augustus Caesar used a shift of 1 - and did not wrap Z around to A, so Z would simply remain Z. The ROT13 variant (shift 13) became popular in early internet forums for hiding spoilers because the same operation encodes and decodes the text.

Brute-force example: all 25 shifts of "KHOOR ZRUOG"

ShiftResult
1JGNNQ YQTNF
2IFMMP XPSME
3HELLO WORLD ✓
4GDKKN VNQKC
5FCJJM UMPJB
6–25(clearly not English)

Shift 3 is immediately recognizable. This illustrates why 25-shift brute force is trivial.

Frequently asked questions

What is a Caesar cipher?

The Caesar cipher is one of the oldest encryption techniques. It shifts every letter in the plaintext forward (or backward) by a fixed number of positions in the alphabet. For example, with a shift of 3, "A" becomes "D", "Z" becomes "C", and non-letter characters stay unchanged.

How do I decode a Caesar cipher without knowing the shift?

Use Brute-Force All to compare every positive shift from 1 to 25. Candidates are ranked by an English letter-frequency chi-squared score and a likely result is labeled, but the ranking is only a clue. Suggest shift uses the most common ciphertext letter as a rough estimate for English text.

Is ROT13 the same as a Caesar cipher?

Yes - ROT13 is a Caesar cipher with a shift of 13. Because 13 + 13 = 26 (the size of the alphabet), ROT13 is self-inverse: applying it twice returns the original text.

Does the shift wrap around the alphabet?

Yes. The alphabet uses A=0 through Z=25 and wraps modulo 26. A shift of 1 turns "Z" into "A"; a shift of 0 leaves every character unchanged. Encode and Decode allow shifts 0–25, while brute force lists shifts 1–25.

How reliable is Suggest shift?

It assumes English and maps the most common input letter to E using (most common letter index − 4 + 26) modulo 26. Letter frequency varies in short messages, so treat the result as unreliable below 30 letters and compare the brute-force candidates. It cannot confirm a plaintext.

Does the Likely brute-force label prove that a result is correct?

No. The tool ranks all 25 decoded candidates by chi-squared distance from typical English letter frequencies. The lowest score is only a statistical clue; short, non-English, or unusual text may rank incorrectly.

Browse all password & security