Caesar Cipher Decoder

Paste a Caesar cipher and pick the shift to decode it as you type, or try all 25 shifts to find the one that reads as English.

Direction
Pick Try All 25 when you do not know the shift.
Shift 3 is the one Julius Caesar used. Shift 13 is ROT13.

Results

23 letters shifted back by 3

Decoded Text

Attack the east wall at dawn.

Most common letter: D. If it stands for E, T or A, the shift is 25, 10 or 3.

Alphabet for Shift 3

  1. AD
  2. BE
  3. CF
  4. DG
  5. EH
  6. FI
  7. GJ
  8. HK
  9. IL
  10. JM
  11. KN
  12. LO
  13. MP
  14. NQ
  15. OR
  16. PS
  17. QT
  18. RU
  19. SV
  20. TW
  21. UX
  22. VY
  23. WZ
  24. XA
  25. YB
  26. ZC

How to Use the Caesar Cipher Decoder

  1. Keep Decode picked under Direction and paste the encoded text. The decoded text appears beside it, or below it on a phone, as you type.
  2. Pick the Shift the message was encoded with, from 1 to 25. Shift 3 is the default.
  3. If you do not know the shift, pick Try All 25. The 25 decodings are listed with the most English one first. Tap a line to decode the whole text with that shift.
  4. To write a message in the cipher, pick Encode and type plain text. Press Copy Text to copy the result, or Use Output as Input to put it back in the box with the direction reversed.

Example of Decoding With Shift 3

The example message is Dwwdfn wkh hdvw zdoo dw gdzq. With Shift 3, every letter becomes the letter three places earlier in the alphabet: D becomes A, W becomes T and K becomes H. The decoded message is Attack the east wall at dawn.

The capital D at the start becomes a capital A, and the spaces and the full stop are unchanged. Under the result is a hint for the shift: the most common letter in the message is D, which appears 6 times. If D is E, T or A in the plain text, the three most common letters in English, the shift is 25, 10 or 3, and shift 3 is one of them.

How to Find an Unknown Shift

A Caesar cipher has only 25 possible shifts, so one of the 25 decodings is the message. With Try All 25 picked, each decoding is scored by how many of its words are common English words, and the best line comes first. For Iypun aol thw av aol vsk jobyjo. the top four lines are:

ShiftDecoded TextEnglish Words
7Bring the map to the old church.7 of 7
14Ukbgz max fti mh max hew vankva.2 of 7
6Csjoh uif nbq up uif pme divsdi.1 of 7
18Qgxcv iwt bpe id iwt das rwjgrw.1 of 7

Shift 7 is the only line where every word is English, so the message was encoded with shift 7. A very short message can have two readable lines; then compare the counts beside them.

Caesar Cipher Alphabet for Shift 3

To encode with shift 3, write each letter three places further on, starting again at A after Z. To decode, read the table from the bottom row up.

PlainABCDEFGHIJKLMNOPQRSTUVWXYZ
Shift 3DEFGHIJKLMNOPQRSTUVWXYZABC

A message encoded with one shift is also decoded by encoding it with the shift that adds up to 26 with it, so text encoded with shift 3 is decoded by encoding it with shift 23. Here is the Latin phrase Veni, vidi, vici encoded with three shifts:

Encoded WithVeni, vidi, vici.Decode by Encoding With
Shift 3Yhql, ylgl, ylfl.Shift 23
Shift 10Foxs, fsns, fsms.Shift 16
Shift 23Sbkf, sfaf, sfzf.Shift 3

Shift 13 is the only shift that is its own reverse, because 13 and 13 are 26. That cipher is ROT13, and the ROT13 Decoder also has ROT5, ROT18 and ROT47.

Julius Caesar and the Shift of Three

The cipher is named after Julius Caesar because the Roman writer Suetonius, in his Life of Julius Caesar, says that when Caesar had something confidential to write, he wrote it in cipher. To read them, Suetonius says, a reader must substitute the fourth letter of the alphabet, namely D, for A, and so with the others (chapter 56, in the 1913 Loeb Classical Library translation). D is three letters after A, so Caesar’s cipher is shift 3.

How Letters Are Shifted and Shifts Are Ranked

In decoding with shift N, each letter A to Z becomes the letter N places earlier, and in encoding the letter N places later, with Z followed by A. Capital letters are still capitals and small letters still small. Digits, spaces, punctuation and letters outside A to Z, such as é, are left as typed, so Café at 9, Rome! with shift 3 is encoded as Fdié dw 9, Urph!.

Try All 25 counts words in the first 300 characters of the message. A word is a run of the letters A to Z, and it counts as English when it is in a list of about 21,800 common English words, or is a or I. When two shifts have the same count, the smaller shift comes first. The hint is based on every letter of the message. The decoding is done in your browser.

FAQs

Q1. How Do You Decode a Caesar Cipher?

You decode a Caesar cipher by moving each letter back through the alphabet by the shift used to encode it, so with shift 3 D becomes A and E becomes B. If you do not know the shift, try all 25 and keep the one that reads as words: Try All 25 lists every shift at once, with the most English reading first.

Q2. What Shift Did Julius Caesar Use?

Julius Caesar used a shift of three, according to Suetonius, who says that a reader of his letters had to put D in place of A and so on through the alphabet. That is why Shift 3 is the default in the Shift list, and why the default message decodes with it.

Q3. How Many Keys Does a Caesar Cipher Have?

A Caesar cipher on the English alphabet has 25 useful keys, the shifts from 1 to 25, since a shift of 26 gives back the same text. With so few keys anyone can try them all in seconds, so a Caesar cipher is no protection against someone who wants to read the message.

Q4. Is ROT13 a Caesar Cipher?

ROT13 is a Caesar cipher with a shift of 13. It differs from other shifts in one way: because 13 is half of 26, encoding twice gives back the original text, so the same step both encodes and decodes. The ROT13 Decoder has a page of its own for it, with ROT5, ROT18 and ROT47 as well.

Q5. How Do You Find the Shift of a Caesar Cipher?

You find the shift of a Caesar cipher by trying all 25 or by counting letters: E, T and A are the most common letters in English, so the most common letter in the message probably stands for one of them. In Dwwdfn wkh hdvw zdoo dw gdzq. the letter D is most common, and reading it as A gives shift 3.

Sources

Suetonius, The Lives of the Twelve Caesars, Life of Julius Caesar, chapter 56, Loeb Classical Library translation (1913), on the LacusCurtius site. Wikipedia article Letter frequency (E, T and A as the most common letters in English texts). A list of about 21,800 common English words, for scoring the 25 shifts.