Free tool · Writing tools
Caesar cipher
Type a message and choose a shift. Each letter moves along the alphabet by that many places. Switch to Decode to read a coded message, or look at the table that tries all 25 shifts for you.
- Free
- No sign-up
- Runs in your browser
- Shift 3, encode
- 10 letters moved
| Shift | Decoded text |
|---|---|
| 1 | Gdkkn, Vnqkc! |
| 2 | Fcjjm, Umpjb! |
| 3 | Ebiil, Tloia! |
| 4 | Dahhk, Sknhz! |
| 5 | Czggj, Rjmgy! |
| 6 | Byffi, Qilfx! |
| 7 | Axeeh, Phkew! |
| 8 | Zwddg, Ogjdv! |
| 9 | Yvccf, Nficu! |
| 10 | Xubbe, Mehbt! |
| 11 | Wtaad, Ldgas! |
| 12 | Vszzc, Kcfzr! |
| 13 | Uryyb, Jbeyq! |
| 14 | Tqxxa, Iadxp! |
| 15 | Spwwz, Hzcwo! |
| 16 | Rovvy, Gybvn! |
| 17 | Qnuux, Fxaum! |
| 18 | Pmttw, Ewztl! |
| 19 | Olssv, Dvysk! |
| 20 | Nkrru, Cuxrj! |
| 21 | Mjqqt, Btwqi! |
| 22 | Lipps, Asvph! |
| 23 | Khoor, Zruog! |
| 24 | Jgnnq, Yqtnf! |
| 25 | Ifmmp, Xpsme! |
How to use the Caesar Cipher
- Type or paste your message into Your text.
- Choose Encode to hide a message or Decode to read one.
- Pick the Shift, or press Use ROT13 for a shift of 13.
- Press Copy. To crack a message with an unknown shift, look in the table under the result.
How does a Caesar cipher work?
A Caesar cipher replaces every letter with the letter a fixed number of places further along the alphabet. That number is the shift. With a shift of 3, A becomes D, B becomes E and so on, and the end of the alphabet wraps round to the start, so X becomes A, Y becomes B and Z becomes C.
The whole alphabet under a shift of 3 looks like this: abcdefghijklmnopqrstuvwxyz turns into defghijklmnopqrstuvwxyzabc. The message "Meet me at noon" becomes "Phhw ph dw qrrq". To read it, move each letter back by the same number, which is what Decode does.
Only the letters A to Z are changed. Spaces, digits, punctuation and letters with accents pass through as they are. Capital letters stay capital and small letters stay small unless you clear Keep capital letters, which makes the whole result capitals. Clearing Keep spaces and punctuation leaves a run of letters only, which hides where the words end.
What is ROT13?
ROT13 is a Caesar cipher with a shift of 13. The alphabet has 26 letters, so 13 is exactly half way round. That makes ROT13 its own undo: apply it once to hide a text, apply it again to get the text back. "Hello" becomes "Uryyb", and "Uryyb" becomes "Hello" again.
Because encoding and decoding are the same step, ROT13 needs no direction. Press Use ROT13 to set the shift to 13. The Encode and Decode buttons then give the same answer. It is used to hide spoilers and puzzle answers lightly, so a reader does not see them by accident. It is not secret writing.
How do I crack a Caesar cipher when I do not know the shift?
Try every shift. There are only 25 useful ones (a shift of 0 or 26 changes nothing), so a person or a computer can check them all in seconds. The table under the result decodes your text with each shift from 1 to 25. Scan the rows for the one that reads as normal words.
Here is that table for the word "Khoor". Only one row makes sense, and it is the shift that was used to hide the word.
| Shift | Decoded |
|---|---|
| 1 | Jgnnq |
| 2 | Ifmmp |
| 3 | Hello |
| 4 | Gdkkn |
| 5 | Fcjjm |
| 6 | Ebiil |
| 7 | Dahhk |
| 8 | Czggj |
| 9 | Byffi |
| 10 | Axeeh |
| 11 | Zwddg |
| 12 | Yvccf |
| 13 | Xubbe |
| 14 | Wtaad |
| 15 | Vszzc |
| 16 | Uryyb |
| 17 | Tqxxa |
| 18 | Spwwz |
| 19 | Rovvy |
| 20 | Qnuux |
| 21 | Pmttw |
| 22 | Olssv |
| 23 | Nkrru |
| 24 | Mjqqt |
| 25 | Lipps |
Shift 3 gives "Hello", so the message was encoded with a shift of 3. Longer messages make the right row obvious at a glance, and short ones can have more than one row that looks like a word, so read the full text before you decide.
Is a Caesar cipher secure?
No. With only 25 possible shifts, anyone can try all of them in moments, so the cipher protects nothing important. Use it for puzzles, games, teaching and light hiding of text. For real secrets use proper, modern encryption in a trusted program.
For a different old-style code with its own signs, see the Morse code translator, and for spelling words aloud use the phonetic alphabet converter. To change letter case after decoding, try the case converter. The text you type is processed in your browser only. It is not sent anywhere.
Use it with
- Phonetic Alphabet Converter: spell text with Alfa, Bravo, Charlie code words.
- Morse Code Translator: text to Morse and back with audio.
- Case Converter: UPPER, lower, Title, Sentence case.
Questions
How do I decode a Caesar cipher?
Choose Decode and enter the shift. If you do not know it, check the table that tries all 25 shifts and pick the row that reads as normal words.
What is a Caesar cipher shift of 3?
Each letter moves three places forward: A becomes D, B becomes E and Z becomes C. Decoding moves each letter three places back.
What is ROT13?
A Caesar cipher with a shift of 13. Applying it twice returns the original text.
How many shifts are there?
Twenty-five that change the text. A shift of 0 or 26 leaves it unchanged.
Does it change numbers and punctuation?
No. Only the letters A to Z are shifted. Digits, spaces, punctuation and accented letters stay as they are.
Is a Caesar cipher safe for private messages?
No. Anyone can try all 25 shifts. Use it for fun or puzzles, not for secrets.
How this page was made: the tool's results are computed in your browser by the code on this page; the explanations were drafted with AI help and checked against the tool's own output.