What is the Caesar cipher?
The Caesar cipher is one of the oldest and simplest ciphers. Each letter is replaced by the letter a fixed number of places further along the alphabet. With a shift of 3, A becomes D, B becomes E and Z wraps around to C. It is named after Julius Caesar, who is said to have used a shift of 3 to protect his messages.
HELLO with a shift of 3 becomes KHOORHow to use the tool
- Type or paste your message.
- Choose Encrypt to shift forward, or Decrypt to shift back.
- Set the shift with the number box or the slider.
The mapping table shows exactly which letter turns into which, so you can also work by hand.
The details
- Only the letters A to Z change. Numbers, spaces and punctuation stay as they are.
- Capital and lowercase letters keep their case.
- A shift of 26 returns the original text, so useful shifts are 1 to 25.
- To decrypt, shift back by the same amount, or shift forward by 26 minus the key.
How secure is it?
Not at all by modern standards. There are only 25 possible keys, so anyone can try them all in seconds. It is best for puzzles, games and learning how ciphers work.
Do not know the shift? Use the Caesar cipher decoder, which tries all 25. To build a puzzle, see the generator. A shift of 13 is special, so see ROT13. The Caesar cipher guide covers the history and how it is broken.