Caesar cipher text generator
A Caesar cipher is the classic substitution cipher that shifts each letter of the alphabet by a fixed amount. Type any message, choose a shift key from 1 to 25 (or roll a random one), and this tool produces the encrypted ciphertext in your browser instantly.
How it works
Each letter is replaced by the letter a fixed number of positions later in the alphabet. With a shift of k, the letter at position i (0–25) becomes position (i + k) mod 26. The modulo wraps the end of the alphabet back to the start, so with a shift of 3, x becomes a. Uppercase and lowercase are handled separately to preserve case, and any character that is not a letter is left untouched.
Decoding reverses the shift: position (i - k) mod 26. Because the operation is a simple rotation, applying a shift of k and then 26 - k returns the original text — that is the round-trip check shown beneath the output.
Tips and example
With a shift of 7, the word Gera becomes Nlyh. To decode it, shift back by 7. A shift of 13 is special: it is its own inverse, known as ROT13, so encoding and decoding use the exact same step.
Because there are only 25 usable shifts, a Caesar cipher is trivial to break and should never be used for real security. It is perfect, though, for escape-room puzzles, treasure hunts, geocaching clues, and teaching how substitution ciphers work.