Caesar Cipher Decoder & Encoder

Encode, decode, or crack any Caesar shift cipher instantly in your browser—100% free, no signup, zero server uploads. Supports custom shifts, keyless Chi-Squared auto-crack, Latin/Spanish/Cyrillic alphabets, and printable PDF wheels.

A→D
025
100% browser-side — your text never leaves your device.

How to use this Caesar shift tool

  1. 01

    Type or paste text

    Enter plaintext or ciphertext above. Pick Encode or Decode and choose Latin (26), Spanish (27, Ñ), or Russian Cyrillic (33, А–Я).

  2. 02

    Set shift or auto-crack

    Adjust the slider, ±1 stepper, negative shifts, or ROT13—or open Auto-Crack to find unknown keys via Chi-Squared frequency scoring.

  3. 03

    Copy, export, or print

    Copy results in one click, export .txt output, or switch to Printable Wheel to download a vector A4 or US Letter PDF.

How the Caesar Cipher Works: Exact Modular Arithmetic

A monoalphabetic shift cipher moves every letter forward or backward by a fixed offset k across an alphabet of length m, wrapping cyclically from the last letter back to the first via true mathematical modulo arithmetic.

EncodeE(x) = (x + n) mod m
DecodeD(x) = ((x − n) mod m + m) mod m
Auto-Crackχ²(k) = Σ (Oᵢ − Eᵢ)² / Eᵢ
  • Arbitrary integer shifts: Any positive, negative, or large integer n normalizes into 0..m−1 via k = ((n mod m) + m) mod m. For Latin (m = 26), −3 equals +23 and +29 equals the classic +3.
  • Case, digits, and 5-letter blocks: Keep original casing or output uppercase, optionally shift digits 0–9 modulo 10, and preserve, strip, or format text into classic 5-letter telegraph blocks.
  • Diacritics and native scripts: Keep accented letters (é, ç, ã, ü) intact or fold them to ASCII bases before shifting, while Spanish Ñ (27-letter) and Russian Ё/Й (33-letter) shift natively.

Historical records by Suetonius note Julius Caesar shifted military dispatches right by 3 (A → D, so HELLO becomes KHOOR). Reversing simply subtracts k modulo m.

6-Language Alphabets, Frequencies & Odd-Modulus Rule

Both sender and receiver must agree on alphabet size m, because adding even one letter shifts every following character.

LanguageAlphabet & ModulusShiftsSelf-Inverse Half-ShiftTop-5 FrequenciesVerified +3
English (/)Latin 26 (A–Z)25ROT13 (k=13)E 12.7%, T 9.1%, A 8.2%, O 7.5%, I 7.0%HELLO → KHOOR
Portuguese (/pt)Latin 26 (accents & ç)25ROT13 (k=13)A 14.6%, E 12.6%, O 10.7%, S 7.8%, R 6.5%CESAR → FHVDU
Russian (/ru)Cyrillic 33 (А–Я + Ё)32None (m=33 odd)О 11.0%, Е 8.5%, А 8.0%, И 7.4%, Н 6.7%ПРИВЕТ → ТУЛЕЗХ
Spanish (/es)Spanish 27 (Ñ) / Latin 2626 / 25None (27) / ROT13 (26)E 13.7%, A 12.5%, O 8.7%, S 8.0%, R 6.9%HOLA → KRÑD / KROD
French (/fr)Latin 26 (accents)25ROT13 (k=13)E 14.7%, S 7.9%, A 7.6%, I 7.5%, N 7.1%BONJOUR → ERQMRXU
German (/de)Latin 26 (umlauts & ß)25ROT13 (k=13)E 17.4%, N 9.8%, I 7.6%, S 7.3%, R 7.0%HALLO → KDOOR
Odd-modulus rule: a self-inverse half-shift exists only when m is even (Latin m = 26 gives ROT13). Spanish (m = 27, with Ñ) and Russian (m = 33, with Ё) are odd moduli and mathematically have no self-inverse ROT-(m/2). Verified +3 outputs: ESPAÑA → HVSDQD (27-letter) vs. HVSDÑD (26-letter); ЦЕЗАРЬ → ЩЗКГУЯ (33-letter).

Keyless Auto-Crack with Chi-Squared Frequency Analysis

For CTF challenges, geocaching, or escape rooms without a known key, Auto-Crack tests all 25, 26, or 32 non-trivial shifts locally in under a millisecond and scores every candidate via χ²(k) = Σ (Oᵢ − Eᵢ)² / Eᵢ against language-specific letter baselines.

Native frequency models prevent false positives on non-English text: Portuguese peaks on A (14.6%) ahead of E (12.6%), German reaches 17.4% on E, and Russian peaks on О (10.97%). The Top 3 confidence cards and frequency bar chart let you verify and apply the best shift in one click.

Caesar Cipher vs. ROT13, Vigenère, and AES-256

ROT13 is simply a Latin shift of 13 (self-inverse since 13 + 13 = 26), useful for hiding forum spoilers—not for confidentiality.

AlgorithmKey SpaceTime to BreakProper Use
ROT131 fixed shift (k=13)< 0.1 msSpoilers, hints, Usenet jokes
Caesar Cipher25–32 shifts (~4.6 bits)< 1 ms brute forceEducation, CTF, geocaching, puzzles
VigenèrePolyalphabetic keywordSeconds (Kasiski test)Historical cryptography labs
AES-256-GCM / ChaCha202²⁵⁶ authenticated keysInfeasiblePasswords, HTTPS, banking, private files

Security Boundary: Never Use for Real Secrets

A shift cipher is an educational obfuscation method, not real encryption. Never use it for passwords, PII, or confidential data—use modern authenticated standards like AES-256-GCM or ChaCha20-Poly1305.

Copyable Code Examples (Python, JavaScript, C)

Python normalizes negative modulo natively, while JavaScript and C require ((shift % m) + m) % m for negative shifts:

def caesar_cipher(text: str, shift: int, alphabet: str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ") -> str:
    m = len(alphabet)
    k = shift % m  # Python % always yields 0..m-1 even for negative shifts
    upper_map = {ch: alphabet[(i + k) % m] for i, ch in enumerate(alphabet)}
    lower_map = {ch.lower(): alphabet[(i + k) % m].lower() for i, ch in enumerate(alphabet)}
    return "".join(upper_map.get(c, lower_map.get(c, c)) for c in text)

print(caesar_cipher("HELLO", 3))        # KHOOR
print(caesar_cipher("KHOOR", -3))       # HELLO

Printable Vector Cipher Wheel (PDF & SVG)

Generate pure-vector A4 or US Letter PDF and SVG wheels directly in your browser for Latin (26), Spanish (27, Ñ), and Russian Cyrillic (33)—in Classroom Color or Ink-Saver B&W, with zero font glitches.

  1. Print at 100% Actual Size on 160–220 gsm cardstock.
  2. Cut along both outer dashed circles (Plaintext outer disk and Ciphertext inner disk).
  3. Align the center crosshairs and fasten with a brass split-pin (brad) so the inner wheel rotates smoothly.

Zero-Upload Privacy & Domain Disambiguation

All encoding, decoding, 6-language Chi-Squared cracking, SVG rotation, and PDF generation on caesarcipher.io run 100% locally in your browser—zero server uploads, zero logs, and no signup.

Independent domain notice: caesarcipher.io (no hyphen, .io TLD) operates solely at https://caesarcipher.io and has no affiliation with caesar-cipher.org, caesarcipher.org, caesar-cipher.com, dcode.fr, boxentriq.com, or cryptii.com.

Frequently asked questions

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

Switch to Auto-Crack, paste your ciphertext, and pick the target language. The browser tests all m − 1 shifts, scores them with the Chi-Squared statistic (χ²), highlights the Top 3 candidates, and lists every shift for one-click adoption.

Is this online Caesar cipher tool private and free on mobile?

Yes—completely free, no account required, and mobile-ready. All cipher transforms, frequency checks, and PDF wheel exports execute 100% locally in your browser with zero server uploads.

What is the difference between a Caesar cipher and ROT13?

ROT13 locks the 26-letter Latin shift to 13 so applying it twice restores the original text. General shift ciphers accept any integer modulo m, whereas odd alphabets like Spanish (27) and Russian (33) have no self-inverse half-shift.

How does the Caesar cipher handle Spanish Ñ, Russian Cyrillic, and accents?

Switch natively between Latin (26), Spanish (27, Ñ between N and O), and Russian Cyrillic (33, А–Я incl. Ё), with options to preserve case, shift digits 0–9, and keep or fold accents. Both sides must match alphabets (HOLA +3 is KRÑD in 27-letter Spanish vs. KROD in 26-letter Latin).

How is the Caesar cipher different from Vigenère and modern AES encryption?

A Caesar shift uses one constant key (25 Latin shifts, ~4.64 bits) and breaks in under a millisecond; Vigenère uses a repeating keyword; AES-256-GCM and ChaCha20 use 256-bit keys. Use shift ciphers only for learning, puzzles, CTF, or geocaching—never for passwords or sensitive data.

How do I print and assemble the free Caesar cipher wheel PDF?

Open Printable Wheel, select your alphabet, A4 or US Letter, and Color or B&W style, then download the vector PDF or SVG. Print at 100% scale on cardstock, cut along the dashed circles, and pin the center crosshairs with a brass split-pin fastener.

Does caesarcipher.io work offline and is it affiliated with similar domains?

Once loaded, all algorithms and PDF generation run purely in your browser without server requests. caesarcipher.io is an independent project unaffiliated with caesar-cipher.org, caesarcipher.org, caesar-cipher.com, or dcode.fr.