๐ Caesar Cipher Cracker
The quick brown fox jumps over the lazy dog
Show all shifts (25 options)
Enter Caesar-cipher ciphertext with an unknown shift, and this tool automatically guesses the most likely shift using frequency analysis โ comparing each of the 25 possible decodings against standard English letter frequencies. All 25 results are also available to compare directly.
How to use
- Enter the ciphertext you want to crack.
- The top guess (whichever shift looks most like English by frequency analysis) is shown automatically.
- Open "Show All Shifts" to compare all 25 possible decodings side by side.
How the calculation works
This tool breaks English text encrypted with a Caesar cipher without knowing the key (the shift). There are only 25 possible shifts, so it first decrypts with every one. It then scores each result by how much it looks like English using the chi-squared statistic: Chi-squared = ฮฃ (observed count โ expected count)ยฒ รท expected count Expected counts come from typical English letter frequencies (E about 12.7%, T about 9.1%, A about 8.2% โฆ). The lower the value, the closer the letter distribution is to normal English. The 25 results are listed best first, so the top one is usually the answer.
Worked example
Ciphertext: Wkh txlfn eurzq ira mxpsv ryhu wkh odcb grj Top candidate (shift 3) The quick brown fox jumps over the lazy dog Other shifts produce unnatural letter sequences such as Vjg โฆ and score much higher.
Things to be aware of
- Short texts (a few words) do not show clear letter frequencies, so the correct answer may not be at the top. Check the first few candidates by eye.
- The frequency table is for English, so text in other languages written in Latin letters may not be ranked well.
- This is a basic example of frequency analysis, which exploits uneven letter frequencies.
FAQ
How does frequency analysis work?
English text has predictable letter frequencies (e.g. 'e' and 't' are common), so this tool picks whichever of the 25 possible shifts produces a letter distribution closest to standard English as its top guess.
Does this work reliably on short text?
Shorter text has more statistical noise, so an incorrect shift can sometimes rank first. Longer text (a few dozen characters or more) gives more reliable results.
Does this work on non-English ciphertext?
No, frequency analysis here is based on English letter frequencies, so it only works on English (Latin-alphabet) text.