What is the Caesar cipher?

The Caesar cipher is one of the oldest and simplest ciphers. It replaces every letter with the letter a fixed number of places further along the alphabet, and that number is the shift. It's named after Julius Caesar, who, according to the Roman historian Suetonius, used a shift of three for his confidential letters. Today it's a favorite of puzzles, escape rooms, geocaches and classrooms, but it keeps nothing secret: with only 25 shifts to try, anyone can break it.

How a shift works

With a shift of 3, every letter moves three places on. At the end, the alphabet wraps around to the start, so X, Y and Z become A, B and C:

Plain:  ABCDEFGHIJKLMNOPQRSTUVWXYZ
Cipher: DEFGHIJKLMNOPQRSTUVWXYZABC

So Picnic at noon becomes Slfqlf dw qrrq: P moves on to S, i to l, c to f, and so on. Whoever knows the shift moves the letters back to read the message.

Tool description

Type or paste your message into the Plain text box and set the Shift, which starts at 3. The cipher text appears in the Cipher text box as you type, ready to copy. Only the letters A to Z move, and they keep their case. Digits, spaces, punctuation, line breaks and letters outside A to Z, such as é or ß, stay as they are. A shift of 0 leaves the text unchanged, and shifts above 25 wrap around, so 26 works like 0 and 29 like 3. To turn a Caesar message back into plain text, press the swap button between the boxes, which also moves the result into the input, or use the Caesar Cipher Decoder.

Examples

Plain text Shift Cipher text
Meet me at the bakery at 10! 3 Phhw ph dw wkh ednhub dw 10!
Picnic at noon 1 Qjdojd bu oppo
Happy birthday! 10 Rkzzi lsbdrnki!
Picnic at noon 13 Cvpavp ng abba
café crème 3 fdié fuèph

Good to know

  • A shift of 13 is ROT13, the cipher that hides spoilers and punchlines online. The ROT Cipher Encoder writes it, along with ROT47 and other variants.
  • The Vigenère cipher shifts each letter by a different amount, taken from a keyword, which makes it harder to break. Try it with the Vigenere Cipher Encoder.
  • Everything runs in your browser, so your messages never leave your device.