Caesar Cipher

Caesar Cipher

Free Caesar cipher encoder & decoder — interactive cipher wheel, brute force 25 shifts, frequency analysis, step-by-step breakdown. ROT13 included.

Updated May 2026

Shift:
0 25 +3
Input Text 0 chars
Output Result
Speed
Instant
Privacy
Local Only
Shift
+3 (41.5°)
Cipher Wheel
ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ3
A → D · Drag inner ring or use ←→ keys
41.5° per step
Shift + Enter to Copy

Caesar Cipher Encoder & Decoder Online — Free, Interactive Cipher Wheel

Encode or decode any text with the Caesar cipher in seconds. Paste your message, choose a shift (1–25), and the result appears instantly. This tool goes beyond a simple encoder: drag the interactive cipher wheel to set your key visually, crack unknown shifts with brute-force all 25 results at once, and analyze letter frequencies to identify the probable key automatically. No signup, no install, 100% in your browser.

The Caesar cipher is the oldest and most widely taught substitution cipher. Understanding how it works — and how to break it — is the foundation of cryptography education, CTF competitions, and escape room puzzles worldwide.

How to Use the Caesar Cipher Tool

Encoding or decoding takes three steps:

  1. Paste your text into the Input field — plaintext for encoding, ciphertext for decoding. The output updates live as you type.
  2. Set the shift using the slider (0–25), the numeric input, or by dragging the cipher wheel's inner ring — the shift number updates in real time.
  3. Copy the result with the Copy button or press Shift + Enter — the encoded or decoded text is ready to use.

To crack an unknown cipher: paste the ciphertext and scroll to the Brute Force section, which shows all 25 decoded results simultaneously with the most readable one highlighted. For longer texts, the Frequency Analysis histogram identifies the likely shift automatically — click the suggested shift to apply it instantly.

Caesar Cipher Examples

Input Shift Output
HELLO WORLD 3 KHOOR ZRUOG
KHOOR ZRUOG 3 (decode) HELLO WORLD
VENI VIDI VICI 3 YHQL YLGL YLFL
Hello, World! 13 (ROT13) Uryyb, Jbeyq!
123 abc 5 123 fgh (numbers preserved)

Edge cases this tool handles: numbers and punctuation are preserved unchanged (standard Caesar behavior). The Keep Case option preserves lowercase letters as lowercase; disabling it converts all output to uppercase. The Include Symbols toggle strips non-letter characters if you only want the alphabetic ciphertext.

What Is the Caesar Cipher?

The Caesar cipher is a monoalphabetic substitution cipher named after Julius Caesar, who reportedly used a shift of 3 for his military correspondence around 50 BCE. Every letter in the plaintext is replaced by the letter a fixed number of positions ahead in the alphabet:

Encrypt: C = (P + shift) mod 26
Decrypt: P = (C − shift + 26) mod 26

Where P is the plaintext letter position (A = 0, B = 1, … Z = 25) and C is the ciphertext position. With shift 3: A → D, B → E, … Z → C. Because the alphabet wraps around, there are exactly 25 possible non-trivial keys (shifts 1–25).

Common Use Cases

  • CTF and escape room puzzles: Caesar cipher is one of the most common cipher types in Capture the Flag competitions and geocaching challenges. Use brute force mode to crack shifts you don't know.
  • Classroom cryptography: teachers use the step-by-step breakdown to demonstrate the (P + shift) mod 26 formula letter by letter, making the algorithm concrete and visual.
  • ROT13 for forums and spoilers: shift 13 is ROT13 — self-inverse, meaning applying it twice returns the original text. Historically used on Usenet and Reddit to hide spoilers.
  • Learning frequency analysis: the integrated histogram shows how letter distribution in ciphertext reveals the key, introducing students to statistical cryptanalysis.
  • Fun messaging: encode messages for friends or colleagues, a tradition as old as the Roman legions.

Common Mistakes with Caesar Cipher

  • Trying to decode with the wrong shift: the most common mistake is decoding with the encoding shift instead of the decoding shift. This tool handles it automatically — just select Decode mode and set the same shift you used to encode.
  • Forgetting ROT13 is self-inverse: ROT13 is both encode and decode with shift 13. Applying "Encode" twice with ROT13 returns the original, so there is no separate decode step.
  • Expecting encryption strength: Caesar cipher provides no real security — any 8-year-old with the brute force table cracks it in seconds. It is exclusively for education, puzzles, and recreational use.

Frequently Asked Questions

What is the Caesar cipher and how does it work?

The Caesar cipher shifts each letter in the alphabet by a fixed number of positions. With shift 3, A becomes D, B becomes E, and Z wraps around to C. Numbers, spaces, and punctuation are left unchanged. Julius Caesar used this cipher in his military correspondence around 50 BCE, which is why it bears his name.

How do I crack a Caesar cipher without knowing the key?

Two methods work reliably. First, brute force: there are only 25 possible shifts, so you can test all of them simultaneously — this tool's Brute Force section shows every result and highlights the most readable one. Second, frequency analysis: in English text, E is the most common letter (12.7%). If the most frequent ciphertext letter is H, the shift is H − E = 3.

What is ROT13 and why is it special?

ROT13 is a Caesar cipher with shift 13. Because the English alphabet has 26 letters, applying ROT13 twice returns the original text — it is self-inverse. This property made it popular on Usenet and forums for hiding spoilers: encode once to hide, encode again to reveal. This tool includes ROT13 as a one-click preset.

Does the cipher wheel change anything functionally?

No — it is a visual representation of the substitution table. The cipher wheel (also called a cipher disk) was the physical tool Julius Caesar's scribes used: two concentric rings with the alphabet, rotated to set the key. Drag the inner ring on this tool and the shift updates in real time. It is the most intuitive way to understand the letter-to-letter mapping.

Can Caesar cipher encrypt numbers and symbols?

Standard Caesar cipher only shifts the 26 letters of the alphabet. Numbers, spaces, and punctuation pass through unchanged. ROT47 is a variant that extends the shift to all 94 printable ASCII characters (! through ~), including digits and symbols.

Resources

Related Tools