Caesar Cipher & ROT13 Decoder

Encode and decode Caesar Cipher and ROT13 text online. Adjust shift keys from 1 to 25, brute-force all 25 shift possibilities, and decrypt secret messages.

Free, no sign-upRuns in your browserUpdated November 2026

Input Message

Alphabet Mapping Preview:
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
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

Output Text

Brute-Force Solver (All 25 Shifts)

How to use the Caesar Cipher & ROT13 Decoder

  1. Type or paste your message into the input text area.
  2. Select whether you want to "Encode" (shift forward) or "Decode" (shift backward).
  3. Adjust the shift key slider between 1 and 25, or click "Set ROT13" for standard ROT13 encryption.
  4. 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:

  1. 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.
  2. Frequency Analysis: In standard written English, certain letters appear with predictable statistical frequency. The letter E appears approximately 12.7% of the time, followed by T (9.1%) and A (8.2%). A cryptanalyst simply identifies the most frequent character in the ciphertext, calculates its offset from E, and cracks the message immediately.
  3. 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?
No. Because the English alphabet has 26 letters, shifting forward by 13 is identical to shifting backward by 13. Running ROT13 on an already encrypted ROT13 string decrypts it back to plain text.
Are spaces, numbers, and punctuation changed by the cipher?
No. The standard Caesar cipher only shifts alphabetic characters (A–Z and a–z). Numbers, spaces, hyphens, and punctuation marks remain untouched in their original positions.
How does the Brute-Force Solver work?
The solver computes all 25 possible shift combinations simultaneously. If you have an encrypted message with an unknown key, click "Show All Shifts" to scan through every possible outcome until you find the legible English phrase.
Can the Caesar cipher be used for secure passwords or banking data?
Never. The Caesar cipher has only 25 possible keys, which can be broken instantly. Modern security uses algorithms like AES-256 or RSA with billions of trillions of key combinations.

Last reviewed November 2026. Results are estimates for information only — see our disclaimer.