Caesar Cipher & ROT13
Shift letters to encode a message, or crack one without the key.
About the Caesar cipher
Shift every letter a fixed number of places along the alphabet and you have a Caesar cipher. Shift by 13 and you have ROT13, which has the pleasing property that applying it twice returns the original text โ the same button both encodes and decodes.
Set the shift with the slider and the result updates as you type. Non-letters pass through untouched, and case is preserved, so punctuation and numbers survive the round trip.
Cracking one without the key
There are only 25 useful shifts, so an attacker can simply try them all โ and the panel below the converter does exactly that, showing every possibility at once.
Picking the right one out of the 25 is automatic too. English letters appear at very stable rates: E about 12.7% of the time, T 9.1%, A 8.2%, and Z under 0.1%. Score each candidate against those frequencies with a chi-squared test and the correct shift stands out immediately, which is why the best guess is marked with a star. This is why the cipher has been broken since at least the ninth century, when al-Kindi wrote the technique down.
What it is good for
Puzzles, geocaching clues, escape rooms, spoiler tags on forums, and teaching how substitution ciphers work. ROT13 in particular became a Usenet convention for hiding punch lines and plot twists โ not to stop anyone reading them, just to stop them being read by accident.
It is not security. If you need something that actually protects a file, use real encryption: this site's file encryptor uses AES-GCM with a PBKDF2-derived key, which is a different category of thing entirely. For hiding text from casual view while keeping it copy-pasteable, Base64 is the usual choice, and it is not secret either.
Frequently asked questions
How do I decode a Caesar cipher without knowing the shift?
Paste the ciphertext and look at the panel below โ every one of the 25 shifts is shown at once, with the most English-looking result starred. Click any line to copy it.
What is ROT13?
A Caesar cipher with a shift of 13. Because 13 is half of 26, encoding and decoding are the same operation, which is why one button does both.
Is a Caesar cipher secure?
No. There are only 25 possible keys, so trying them all takes a fraction of a second, and letter-frequency analysis picks the right one automatically. Treat it as a puzzle, never as protection.
Does the cipher work with numbers and punctuation?
They pass through unchanged. Only the 26 letters are shifted, and upper and lower case are both preserved.
What shift did Julius Caesar actually use?
Three, according to Suetonius โ A became D. The general technique now carries his name whatever shift you pick.