Skip to main content

Caesar Cipher Decoder

Encode a message with a Caesar shift, or paste a coded message to decode it. If you do not know the shift, the decoder tries all 25 and puts the most English-looking one first.

Plain textCipher text
Your translation appears here.Try:

How to use the Caesar cipher decoder

  1. To encode, type your message and choose a Shift from 1 to 25. The hint next to the box shows what A becomes.
  2. To decode, press the arrows between the two labels and paste the coded message. If you know the shift, set it.
  3. If you do not know the shift, look at All 25 shifts under the box. The row marked Most likely is the one whose letters best match English. Tap any row to use that shift.
  4. Press Copy to paste the result anywhere.

How the Caesar cipher works

Write the alphabet, then write it again moved along by the shift. Each letter of the message is swapped for the letter under it. With a shift of 3:

  • Plain: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
  • Coded: D E F G H I J K L M N O P Q R S T U V W X Y Z A B C

So HELLO becomes KHOOR. To decode, move each letter back by the same shift. A shift of 23 forward is the same as 3 back, which is why there are only 25 useful shifts.

How the decoder finds the shift

English uses some letters far more than others: E, T, A, O and I are common, while J, Q, X and Z are rare. A Caesar cipher moves those frequencies along with the letters, so in a coded message the most common letter is often the one E turned into. The decoder undoes each of the 25 shifts, counts the letters in each result and compares them with normal English letter frequencies using a chi-squared score. The result that fits best is marked Most likely.

This works well on a sentence or more. On a few words the counts are too small to be reliable, so check the other rows if the top one looks wrong.

History of the Caesar cipher

The Roman historian Suetonius wrote that Julius Caesar wrote private letters by replacing each letter with the one three places further on, so that A became D. His successor Augustus is said to have used a shift of one. The cipher was easy to break once people knew the method, and in the 9th century the Arab scholar al-Kindi described frequency analysis, the counting technique that breaks it.

Today the Caesar cipher is a first lesson in cryptography and a favorite in puzzle hunts, escape rooms and games. ROT13, its shift of 13, is still used online to hide spoilers and puzzle answers.

Frequently asked questions

How do I decode a Caesar cipher without the key?

Switch to decoding and paste the message. The decoder tries all 25 shifts and ranks them by how closely their letter counts match English, so the right answer is usually at the top. For very short messages the ranking can miss, so read down the list too.

What is a Caesar cipher?

A Caesar cipher replaces each letter with the letter a fixed number of places further along the alphabet, wrapping round from Z to A. With a shift of 3, A becomes D, B becomes E and Z becomes C. It is named after Julius Caesar, who used a shift of three for private letters.

What is ROT13?

ROT13 is a Caesar cipher with a shift of 13. Because the alphabet has 26 letters, shifting by 13 twice brings you back to the start, so the same step encodes and decodes. Set the shift to 13 to use it.

Is the Caesar cipher secure?

No. There are only 25 possible shifts, so anyone can try them all in seconds, as this page does. Use it for puzzles, games and teaching, never for real secrets.

What happens to numbers, spaces and punctuation?

They stay as they are. Only the letters A to Z are shifted, and capital letters stay capital. Accented letters are not shifted.