Caesar Cipher Encoder
The Caesar cipher shifts every letter by a fixed number, A becomes D under a +3 shift, B becomes E, and so on wrapping around from Z to A. Named after Julius Caesar, who allegedly used shift 3 for his private correspondence, it’s the simplest substitution cipher and still useful for puzzles, classroom demos, and the classic ROT13 usenet convention. Paste text, pick a shift, encode or decode.
How the Caesar cipher works
-
1
Enter plaintext or ciphertext
Any English text. Non-letters (numbers, punctuation, spaces) pass through unchanged. Case is preserved.
-
2
Choose a shift value
Any integer 1-25. Shift 13 is ROT13: its own inverse. Classical Caesar used 3.
-
3
Pick direction
Encode shifts forward; decode shifts backward. Decoding with shift K is equivalent to encoding with shift 26-K.
-
4
Read the result
Ciphertext (or decoded plaintext) appears instantly. Copy with one click.
How a Caesar shift looks
Shift of 3 applied to the alphabet:
Plain: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Cipher: D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
Example: HELLO with shift 3 → KHOOR. Decode KHOOR with shift 3 (or encode with shift 23) → HELLO.
ROT13: the self-inverse shift
ROT13 uses shift 13. Applied twice it returns the original text: HELLO → URYYB → HELLO. This made it ideal for hiding spoilers in 1980s Usenet posts: a single transform encoded and decoded, no key to remember.
Security (or the lack of it)
The Caesar cipher is broken by design against any modern analysis:
- Brute force: only 25 possible shifts. Try all, pick the one that reads like English.
- Frequency analysis: shifted text preserves letter frequencies.
Eis still the most common in English; whichever letter is most common in the ciphertext is likely the shifted version ofE. - Known-plaintext: if you know even one original letter, you know the shift.
Don’t use it for anything you need to protect. It’s pedagogical, not practical.
Variants and extensions
- ROT5: shifts only digits (0-9). Used alongside ROT13 in ROT18.
- ROT47: shifts 94 printable ASCII characters; self-inverse like ROT13.
- Vigenère: Caesar with a keyword so each position uses a different shift. Much harder to break.
- Atbash: swap A↔Z, B↔Y, and so on. A fixed-shift relative to Hebrew historical use.
Classroom use
The Caesar cipher is a staple of first-week cryptography courses: it introduces modular arithmetic, substitution, frequency analysis and the concept of a key without requiring any heavy math. It’s also the solution to many CTF “beginner crypto” challenges.
Frequently Asked Questions
Suetonius reports Caesar used a shift of 3 for his correspondence. Augustus allegedly used shift 1 (A → B, B → C, Z → A or AA, depending on sources).
No. Classical Caesar is defined on the 26-letter Roman alphabet. Accented letters (é, ñ, ü) pass through unchanged. For multi-alphabet ciphers you need a modern substitution scheme.
Convenience. It hides text casually (spoilers, puzzle answers, mild profanity filters) while being trivial to decode. It was never meant as security, only as a light obfuscation.
Yes, easily. Try all 25 shifts and scan for readable English. Longer ciphertext (20+ characters) is effectively unambiguous; very short ciphertext may have multiple plausible shifts.
Related Tools
A1Z26 Cipher Encoder
Encode text using the A1Z26 cipher (A=1, B=2, ... Z=26) or decode a number sequence back to letters, with customizable separator.
AES Encrypt / Decrypt
Encrypt and decrypt low-risk text with AES OpenSSL ciphers. The passphrase is hashed with SHA-256 and the Base64 output is IV plus ciphertext.
Base32 Encoder and Decoder
Encode and decode Base32 strings using the RFC 4648 alphabet. Useful for TOTP secrets, case-insensitive tokens and human-typed identifiers.
Atbash Cipher Encoder
Encode or decode text with the Atbash cipher, a Hebrew substitution that maps A-Z to Z-A. Same operation encrypts and decrypts.
Base85 Encoder and Decoder
Encode and decode Base85 in Adobe Ascii85 (PostScript/PDF) or Z85 (ZeroMQ) variants. More compact than Base64 for binary data.
bcrypt Hash Generator
Generate bcrypt hashes or verify a plaintext password against an existing bcrypt hash. Side-by-side generate and verify in one tool.