handy.moe

All tools / Hacker kit

A professor reading a book

Caesar cipher

Shift every letter a few places along the alphabet: with a shift of 3, A becomes D and Z wraps round to C. Encode, decode, or paste a message and let the tool try all 25 shifts and mark the one that reads like English.

Runs in your browser. Nothing you type is sent anywhere.

How to use it

  1. Type or paste your text.
  2. Choose a shift (3 is Julius Caesar's own) and Encode or Decode.
  3. Don't know the shift? Look at the list underneath: every possible shift, with the most likely one marked. Click a shift to use it.

How the Caesar cipher works

Suetonius wrote that Julius Caesar wrote private letters with each letter replaced by the one three places later in the alphabet. That is the whole cipher: one secret number, the shift. With only 25 possible shifts it falls to anyone who tries them all, which is what the list on this page does. It's still the classic first cipher, the base of ROT13, and a common warm-up in puzzle hunts and CTFs.

Questions

Does it keep capitals, spaces and punctuation?

Yes. Only the letters A to Z move; capitals stay capitals and everything else is left as it is.

How does it pick the most likely shift?

It scores each shift by how often its four-letter sequences turn up in real English (counted from public-domain books) and marks the best.

What's the difference from ROT13?

ROT13 is a Caesar cipher with a shift of 13. Because the alphabet has 26 letters, doing it twice gets you back where you started.