Caesar Cipher Decoder & Encoder

DA

100% browser-side — your text never leaves your device.

Decode, encode, or auto-crack any Caesar shift cipher locally in your browser — 100% free, zero uploads.

How to use this Caesar shift tool

  1. 01

    Paste or type text

    Paste ciphertext into the Caesar cipher decoder above or switch to Encode. Choose Latin (26), Spanish (27, Ñ), or Russian Cyrillic (33, А–Я).

  2. 02

    Set shift or auto-crack

    Pick any positive or negative shift, click ROT13, or open Auto-Crack to break an unknown key automatically with Chi-Squared scoring.

  3. 03

    Copy, share, or print

    Copy decoded text, share a puzzle link or PNG challenge card, export .txt, or generate a vector A4 / US Letter PDF wheel.

How the Caesar Cipher Works: Exact Modular Arithmetic

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

  • 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 +3.
  • Case, digits, and 5-letter blocks: Keep original casing or force uppercase, optionally shift digits 0–9 modulo 10, and preserve, strip, or format text into classic 5-letter telegraph blocks.
  • Diacritics and native scripts: Preserve accented characters (é, ç, ã, ü) or fold them to ASCII bases before shifting, while Spanish Ñ (27-letter) and Russian Ё/Й (33-letter) shift natively.

Suetonius recorded Julius Caesar shifting military messages right by 3 (A → D, so HELLO becomes KHOOR). Our Caesar cipher decoder reverses any key by subtracting 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 in the message.

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%
Portuguese (/pt)Latin 26 (accents & ç)25ROT13 (k=13)A 14.6%, E 12.6%, O 10.7%, S 7.8%, R 6.5%
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%
French (/fr)Latin 26 (accents)25ROT13 (k=13)E 14.7%, S 7.9%, A 7.6%, I 7.5%, N 7.1%
German (/de)Latin 26 (umlauts & ß)25ROT13 (k=13)E 17.4%, N 9.8%, I 7.6%, S 7.3%, R 7.0%
Odd-modulus rule: a self-inverse half-shift exists only when m is even (Latin m = 26 yields 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).
χ² · <1 ms

Keyless Auto-Crack with Chi-Squared Frequency Analysis

For CTF challenges, geocaching, or escape rooms without a known key, our Caesar cipher decoder 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 baselines.

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

DE · E · 17.4%
Chi-Squared frequency analysis chart comparing shifted ciphertext peak at H against aligned English peak at E 12.7%, alongside 6-language top letter frequencies
Left: shifting ciphertext back by −3 aligns the peak onto English E (12.7%). Right: why our decoder uses 6 native frequency models (PT-BR A 14.6%, DE E 17.4%, RU О 11.0%).

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

ROT13 is simply a 26-letter Latin shift locked to 13 (self-inverse since 13 + 13 = 26), useful for hiding forum spoilers—not 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 Caesar cipher encoder provides zero cryptographic security and breaks in milliseconds. Never use it for passwords, PII, or confidential data—use vetted authenticated encryption 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 to keep shifts in range:

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 spins smoothly.

Zero-Upload Privacy & Domain Disambiguation

Every operation in this online Caesar cipher decoder and encoder—shifting, 6-language Chi-Squared cracking, SVG wheel rotation, share cards, and PDF generation—runs 100% locally in your browser with 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

Paste your ciphertext and click Auto-Crack. The engine tests all m − 1 shifts locally, scores them with the Chi-Squared statistic (χ²), highlights the Top 3 plaintexts, and lists every shift for one-click adoption.

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

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.

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).

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.

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.

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.