Caesar / ROT13 Cipher
100% LocalEncrypt and decrypt text with Caesar cipher or ROT13.
Enter text and adjust the shift. Use brute-force mode to show all 25 possible decryptions at once.
What is Caesar / ROT13 Cipher?
Frequently Asked Questions
Technical Deep Dive
Caesar / ROT13 Cipher
Apply a Caesar cipher with any shift from 1–25, or use the classic ROT13 (shift 13). Supports encrypt, decrypt, and brute-force modes that show all 25 possible decryptions at once. Non-alphabetic characters are preserved unchanged.
Spec-Compliant
Follows the RFC or de-facto encoding rules, no custom dialects, no surprises.
Lossless Round-Trip
Encode then decode and you get back exactly what you put in, byte for byte.
Handles Edge Cases
Unicode, padding, invalid input, surfaced clearly instead of silently mangling output.
01 Shift Alphabet Matrix (k=3)
| Type | A | B | C | D | ... | X | Y | Z |
|---|---|---|---|---|---|---|---|---|
| Plaintext | A | B | C | D | ... | X | Y | Z |
| Ciphertext | D | E | F | G | ... | A | B | C |
02 Transformation Logic Pipeline
(code + shift) % 26 algorithm.
03 When You Reach for Caesar / ROT13
Caesar is a teaching cipher, a puzzle primitive, and a social convention, never a security tool. Use it where the goal is light obfuscation or pedagogy, and stay far away from it for anything that protects real data.
-
CTF and crypto challenges PicoCTF, HackTheBox intro tracks, and Cryptopals Set 1 all feature Caesar/ROT13 as the warm-up. Recognising a constant shift by frequency analysis is the entry-level skill before stepping up to Vigenère or substitution ciphers.
-
Spoiler tags on Usenet, Reddit, and forums ROT13 has been the convention for hiding spoilers, joke punchlines and offensive content since the 1980s. The point is not secrecy, it is a one-click round-trip that requires deliberate effort to read.
-
Escape rooms and kids' puzzles Cracking a Caesar with paper and pencil is satisfying for a child; the alphabet wheel is a classic prop. It is a great introduction to the very idea of a "key" without any of the math of modern crypto.
-
"Obscuring" config values in source code Some teams ROT13 a string to make it less greppable in a repo. Anyone with two minutes and a search engine can reverse it. If something must not be in the repo, use a secret manager, not a shift.
-
Protecting passwords, tokens, or PII 25 possible keys is a brute-force size of "try them all in microseconds." Frequency analysis breaks even a long Caesar instantly. For real confidentiality use AES-GCM, ChaCha20-Poly1305, or libsodium, never a shift cipher.
04 Worked Examples
The treasure is behind the painting
Gur gernfher vf oruvaq gur cnvagvat
The treasure is behind the painting
Because 13 + 13 = 26 and the English alphabet has 26 letters, ROT13 is an involution: encrypt = decrypt. This is why Usenet adopted it, one button toggles the spoiler in either direction.
Khoor Zruog, wklv lv d Fdhvdu flskhu
h ─ 5 times (most common)
l ─ 4 times
v ─ 3 times
h - e = 3, so shift back 3:Hello World, this is a Caesar cipherIn English: E, T, A, O, I, N, the ETAOIN heuristic. Even a 30-character Caesar leaks enough frequency information that the shift is obvious without trying all 25 keys.
Caesar → 25 keys (microseconds)
DES → 2^56 keys (broken, ~hours)
AES-128 → 2^128 keys (heat-death-of-universe)for k in 1..25:
candidate = decrypt(ct, k)
print(k, candidate)
total time: a few microseconds, then a human eye picks the English one
Even without frequency analysis the entire keyspace is enumerable faster than you can read this paragraph. Caesar's security model is literally "the attacker doesn't realise it's a Caesar."
05 Related Tools
Caesar lives in a corner of "classical ciphers and puzzle primitives." For real cryptography or richer transformations, step over to these.
AES Encryption
When you actually need confidentiality, AES-GCM with a real 128- or 256-bit key.
Morse Code Translator
Another historical encoding worth knowing, and another CTF favourite.
Character Counter
Letter-frequency stats on the ciphertext help spot the shift without running all 25 candidates by eye.