A Caesar cipher shifts every letter by the same number of places in the alphabet. Enter a message and choose a shift to encode it, or select Decode to move the letters back. Click a letter in the step view to see its position, the shift, and the result.

How the Caesar shift works

  • Letters are numbered A = 0 through Z = 25. Encoding adds the shift; decoding subtracts it.
  • Shifts wrap around the alphabet. A shift of 29 works like 3, and −3 works like 23.
  • Letters become uppercase. Spaces and punctuation are kept by default and do not use a letter position.
  • To use accented letters or ligatures, choose the conversion options you need and check the prepared input.

A message with punctuation

InputHELLO, WORLD!
SettingsEncode; shift 3; preserve nonletters
Expected resultKHOOR, ZRUOG!
Try this method
InputIndexAdd 3Output
H710K
E47H
L1114O
O1417R
W2225Z

In this example, all 10 letters shift while the comma, space, and exclamation mark stay in place. Decode KHOOR, ZRUOG! with shift 3 to get HELLO, WORLD! back. Letters are shown in uppercase, so decoding does not restore the original capitalization.

When the shift is unknown

Select “Show all 26 shifts” to compare possible messages in key order. The list includes shift 0, which leaves letters unchanged. A result that reads like a sentence may be worth exploring, but the tool cannot tell you whether it was the intended message.

Try one yourself

Encode ZEBRA with shift 3. Follow Z across the end of the alphabet before working on the remaining letters.

Keep exploring

Work through Caesar shift 3How modulo 26 wraps around the alphabetPrint beginner Caesar puzzlesPlan a three-clue classroom trailGet started with CipherSteps