What it does
The Caesar cipher is one of the oldest and simplest encryption techniques: every letter in the message is shifted a fixed number of positions down the alphabet. For example, with a shift of 3, A becomes D, B becomes E, and so on, wrapping back to the start after Z.
Decrypting is just shifting in the opposite direction — this tool lets you do both with the same shift value.
Try it
How it works
- Each letter is converted to its position in the alphabet (
A/a= 0). - Encrypt:
new position = (position + shift) mod 26 - Decrypt:
new position = (position - shift + 26) mod 26 - Letter case is preserved, and any character that isn't a letter (numbers, spaces, punctuation) is left untouched.
- The result is converted back to letters and displayed.
This is a historical/educational cipher only — it provides no real security by modern standards and is trivial to break (only 25 possible shifts to brute-force, or simple frequency analysis). Everything runs locally in your browser.