How to use the Caesar Cipher & ROT13 Decoder
- Type or paste your message into the input text area.
- Select whether you want to "Encode" (shift forward) or "Decode" (shift backward).
- Adjust the shift key slider between 1 and 25, or click "Set ROT13" for standard ROT13 encryption.
- Click "Copy Text" to copy the result, or open "Show All Shifts" to brute-force crack an unknown cipher.
What is the Caesar Cipher?
The Caesar Cipher is one of the earliest and simplest substitution ciphers in recorded history. Attributed to the Roman general and dictator Julius Caesar around 58 BC, the cipher was utilized to safeguard military orders, troop movements, and sensitive political dispatches addressed to Marcus Tullius Cicero and field commanders.
Whenever Caesar sent confidential messages, he substituted each letter of the Latin alphabet with the letter positioned three places forward: A became D, B became E, and so on. If hostile scouts intercepted his messengers, the resulting jumble of letters appeared incomprehensible unless the recipient knew the secret shift offset.
Mathematical Definition & Modular Arithmetic
In modern computer science and discrete mathematics, the Caesar Cipher is expressed through modular arithmetic on integers representing the 26 letters of the English alphabet ((A=0, B=1, dots, Z=25)):
Encryption Formula
For a plaintext letter (P) and shift key (k):
C = (P + k) mod 26
Decryption Formula
To reverse the encryption and retrieve the original plaintext letter (P) from ciphertext letter (C):
P = (C - k + 26) mod 26
What is ROT13?
ROT13 ("Rotate by 13 places") is a special case of the Caesar cipher where the shift key is fixed at (k = 13). Because the modern English alphabet contains exactly 26 letters, rotating by 13 is an involution—applying ROT13 a second time automatically restores the original text:
ROT13(ROT13(text)) = text
During the 1980s and 1990s, ROT13 became an internet standard (RFC 1392) on Usenet newsgroups, web forums, and geocaching logs to obscure movie spoilers, puzzle punchlines, adult humor, and hints from casual view without requiring encryption keys or complex software.
Why Caesar Ciphers are Not Secure Today
While fascinating from a historical and educational standpoint, the Caesar cipher offers zero cryptographic security against modern computers or human cryptanalysts:
- Extremely Small Key Space: There are only 25 non-trivial shifts in the English alphabet. A modern computer or our built-in Brute-Force Solver checks all 25 candidates in under one millisecond.
- Frequency Analysis: In standard written English, certain letters appear with predictable statistical frequency. The letter
Eappears approximately 12.7% of the time, followed byT(9.1%) andA(8.2%). A cryptanalyst simply identifies the most frequent character in the ciphertext, calculates its offset fromE, and cracks the message immediately. - No Polyalphabetic Diffusion: Modern ciphers (like AES-GCM and ChaCha20) diffuse byte relationships across multiple rounds of substitution and permutation. Caesar simply translates letters one-for-one, preserving word lengths, spaces, and punctuation patterns.
Frequently asked questions
Does ROT13 need a separate decryption button?
Are spaces, numbers, and punctuation changed by the cipher?
How does the Brute-Force Solver work?
Can the Caesar cipher be used for secure passwords or banking data?
Last reviewed November 2026. Results are estimates for information only — see our disclaimer.