Open Caesar, choose Encode, and enter HELLO, WORLD! with shift 3. Leave “Keep spaces and punctuation” selected. We will follow the ten letters through the alphabet and then decode the result.

1. Inspect the input

The message has ten letters and three other characters: a comma, a space, and an exclamation mark. Only the letters shift. Since the text is already uppercase A–Z, no accent or ligature conversion is needed.

The complete conversion

InputHELLO, WORLD!
SettingsEncode; shift 3; A = 0; preserve nonletters
Expected resultKHOOR, ZRUOG!
Try this method

2. Follow every letter

Letter positionInputIndex P(P + 3) mod 26Output
1H710K
2E47H
3L1114O
4L1114O
5O1417R
6W2225Z
7O1417R
8R1720U
9L1114O
10D36G

Select the first H to follow 7 → 10 → K in the step view. Each L becomes O. Unlike a repeating-key cipher, Caesar uses the same shift for every letter.

3. Keep the punctuation in place

The first word becomes KHOOR, followed by the original comma and space. WORLD becomes ZRUOG, followed by the exclamation mark. Together they make KHOOR, ZRUOG!. Punctuation stays in place and does not appear as a letter step.

4. Check decoding

Choose Decode and keep shift 3. K = 10 moves back to 7, or H. G = 6 moves back to 3, or D. Repeating that subtraction for all ten letters returns HELLO, WORLD!.

Your turn

Change only the last word to ZEBRA, keeping the shift at 3. Predict the first letter of that word before converting.

Continue the lesson

Caesar cipher toolHow modulo 26 wraps around the alphabetPrint beginner Caesar puzzlesGet started with CipherSteps