Caesar Cipher

Encode with any shift, or break one by reading all twenty-six answers

Runs 100% in your browserNothing is uploaded to a serverInstant results

Direction

Shift

Input

Result

Copied!

All twenty-six shifts

The key space is twenty-six. That is the whole weakness — you do not need a technique, you read the list and pick the English one.

ShiftText

A cipher with twenty-five wrong answers is not really a cipher

Suetonius records that Julius Caesar wrote his confidential letters with each letter replaced by the one three places further on, so that A became D and the message meant nothing to a courier who intercepted it. It worked, and the reason it worked has nothing to do with the cipher: almost nobody in first-century Rome could read at all, and the few who could had never met the idea that writing might be deliberately scrambled. The security was in the novelty.

The moment the idea is known, the whole scheme collapses, because there are only twenty-five wrong answers. That is not a large enough space to hide in — you do not need a computer, a key or any cleverness, you write out all twenty-six lines and look for the one that is English. This page shows you those twenty-six lines rather than pretending anything more sophisticated is required, and that table is the honest teaching tool: it makes the size of the key space visible in a way a paragraph about it cannot.

The frequency button is the other classic method, and it is worth understanding rather than just pressing. English is lopsided — E is about 12% of letters, T about 9%, and the bottom half of the alphabet barely registers — so a shifted text has a shifted version of that same lopsided shape. Comparing the letter counts against the expected English shape at each of the twenty-six offsets and picking the closest is one line of arithmetic. It is reliable on a sentence, unreliable on three words, and useless on a single one, which is why it suggests a shift here rather than announcing an answer.

One property worth noticing: shift 13 is its own inverse, because 13 is half of 26. Encoding twice returns the original, so encoder and decoder are the same operation and no direction has to travel with the message. That single convenience is why ROT13, and not shift 3 or shift 7, is the one that became a convention, and it has its own page.

Caesar's own shift of three

In
attack at dawn
Out
dwwdfn dw gdzq

Caesar Cipher questions

How do I break a Caesar cipher without knowing the shift?

Read all twenty-six shifts and pick the English one — the table on this page updates as you type, so the answer is already on screen. That works because the key space is twenty-six, small enough to check exhaustively by eye in seconds. For a longer text the frequency button gets you there in one step by matching letter counts against English's expected distribution, but on anything shorter than a sentence you should trust your eye over the arithmetic.

Does it shift numbers and punctuation?

No, and that is the standard definition rather than a shortcut. Only the twenty-six letters rotate; digits, spaces and punctuation pass through untouched. This is also the cipher's second weakness after its tiny key space: word lengths, apostrophes and sentence punctuation all survive, so the shape of the message is legible even before it is decoded.

Is a Caesar cipher the same as ROT13?

ROT13 is a Caesar cipher with the shift fixed at 13. The reason it gets its own name is that 13 is exactly half of 26, so applying it twice returns the original text and one operation serves as both encoder and decoder. Caesar's own letters used a shift of three, which does not have that property.