Caesar Cipher Decoder & Encoder
100% browser-side — your text never leaves your device.
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.
Paste ciphertext into the Caesar cipher decoder above or switch to Encode. Choose Latin (26), Spanish (27, Ñ), or Russian Cyrillic (33, А–Я).
Pick any positive or negative shift, click ROT13, or open Auto-Crack to break an unknown key automatically with Chi-Squared scoring.
Copy decoded text, share a puzzle link or PNG challenge card, export .txt, or generate a vector A4 / US Letter PDF wheel.
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.
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.
Both sender and receiver must agree on alphabet size m, because adding even one letter shifts every following character in the message.
| Language | Alphabet & Modulus | Shifts | Self-Inverse Half-Shift | Top-5 Frequencies | Verified +3 |
|---|---|---|---|---|---|
| English (/) | Latin 26 (A–Z) | 25 | ROT13 (k=13) | E 12.7%, T 9.1%, A 8.2%, O 7.5%, I 7.0% | |
| Portuguese (/pt) | Latin 26 (accents & ç) | 25 | ROT13 (k=13) | A 14.6%, E 12.6%, O 10.7%, S 7.8%, R 6.5% | |
| Russian (/ru) | Cyrillic 33 (А–Я + Ё) | 32 | None (m=33 odd) | О 11.0%, Е 8.5%, А 8.0%, И 7.4%, Н 6.7% | |
| Spanish (/es) | Spanish 27 (Ñ) / Latin 26 | 26 / 25 | None (27) / ROT13 (26) | E 13.7%, A 12.5%, O 8.7%, S 8.0%, R 6.9% | |
| French (/fr) | Latin 26 (accents) | 25 | ROT13 (k=13) | E 14.7%, S 7.9%, A 7.6%, I 7.5%, N 7.1% | |
| German (/de) | Latin 26 (umlauts & ß) | 25 | ROT13 (k=13) | E 17.4%, N 9.8%, I 7.6%, S 7.3%, R 7.0% |
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.
ROT13 is simply a 26-letter Latin shift locked to 13 (self-inverse since 13 + 13 = 26), useful for hiding forum spoilers—not confidentiality.
| Algorithm | Key Space | Time to Break | Proper Use |
|---|---|---|---|
| ROT13 | 1 fixed shift (k=13) | < 0.1 ms | Spoilers, hints, Usenet jokes |
| Caesar Cipher | 25–32 shifts (~4.6 bits) | < 1 ms brute force | Education, CTF, geocaching, puzzles |
| Vigenère | Polyalphabetic keyword | Seconds (Kasiski test) | Historical cryptography labs |
| AES-256-GCM / ChaCha20 | 2²⁵⁶ authenticated keys | Infeasible | Passwords, HTTPS, banking, private files |
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.
Python normalizes negative modulo natively, while JavaScript and C require ((shift % m) + m) % m to keep shifts in range:
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)) # HELLOGenerate 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.
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.
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.