Caesar Cipher Encoder/Decoder - Adjustable Shift
Encode or decode text using the classic Caesar cipher with any adjustable shift amount from 1 to 25, with a mode toggle since arbitrary shifts aren't self-inverse.
Shift Amount: 3
Ciphertext
How to Use the Caesar Cipher Encoder/Decoder
Pick a shift amount from 1 to 25 using the slider, choose Encode or Decode, and type or paste your text. In Encode mode, every letter shifts forward through the alphabet by the chosen amount, wrapping from Z back to A, while case is preserved and non-letter characters (numbers, spaces, punctuation) pass through unchanged. In Decode mode, the tool automatically applies the complementary shift (26 minus your chosen amount) so the same shift value correctly reverses an encoded message.
Example
With a shift of 3 in Encode mode, "Hello, World!" becomes "Khoor, Zruog!" — each letter moved 3 places forward (H→K, e→h, and so on). Switching to Decode mode with the same shift of 3 and entering "Khoor, Zruog!" returns the original "Hello, World!".
Common Use Cases
- Learning how classical substitution ciphers work in a cryptography or computer science class.
- Creating a customizable secret code for puzzles, games, or scavenger hunts.
- Decoding a Caesar-shifted message when you know or can guess the shift amount.
FAQs
- How is this different from the ROT13 Encoder/Decoder? ROT13 is specifically the fixed 13-shift case of the Caesar cipher, which happens to be self-inverse — applying it twice returns the original text, so one box handles both directions. This tool allows any shift from 1 to 25, and since an arbitrary shift generally isn't self-inverse, it requires an explicit Encode/Decode mode toggle to pick the correct direction.
- What happens if I set the shift to exactly 13? At a shift of 13, this tool behaves exactly like ROT13 — encoding and decoding become the same operation, since shifting forward 13 and shifting back 13 (26-13=13) are identical.
- Is the Caesar cipher secure? No — with only 25 possible shifts, a Caesar cipher can be broken almost instantly by trying every shift value or using letter-frequency analysis. It's useful for learning and casual puzzles, not for protecting sensitive information.
