Frequency Analysis Tool
Break Ciphers with Statistical Analysis
About Frequency Analysis
Frequency analysis is one of the most powerful techniques in cryptanalysis. By examining how often letters, pairs (bigrams), and triplets (trigrams) appear in encrypted text, you can break substitution ciphers and understand text patterns.
In English, the letter E appears most frequently (~12.7%), followed by T (~9.1%), A (~8.2%), and so on. Common bigrams include TH, HE, IN, ER, while common trigrams include THE, AND, ING, HER.
Use Cases:
- Breaking Substitution Ciphers: Match encrypted letter frequencies to English patterns
- Language Detection: Different languages have different frequency distributions
- Text Authenticity: Natural text follows expected patterns
- Cipher Identification: Unusual frequencies suggest different cipher types
- Learning Cryptanalysis: Understand fundamental cipher-breaking techniques
📊 Analysis Results
📚 How Frequency Analysis Works
The Basics
Every language has predictable patterns in how often letters appear. In English, some letters are far more common than others. By counting letter frequencies in encrypted text, we can make educated guesses about substitutions.
Expected English Frequencies
Bigrams & Trigrams
Looking at pairs and triplets of letters provides even more powerful analysis:
Breaking a Cipher
To break a substitution cipher with frequency analysis:
- Count frequencies: Analyze the ciphertext
- Match patterns: Compare with expected English frequencies
- Make substitutions: Replace most common cipher letters with E, T, A, etc.
- Look for patterns: Watch for common words like THE, AND, OF
- Refine: Adjust based on context and word patterns
Frequency analysis works best on longer texts (100+ characters). Short messages may not have representative frequencies. It's also ineffective against polyalphabetic ciphers (like Vigenère) that use multiple substitution alphabets.
💡 Example Analyses
Example 1: Normal English Text
Example 2: Caesar Cipher (Shift 3)
Example 3: Random Substitution
❓ Frequently Asked Questions
How much text do I need for accurate analysis?
Generally, at least 100 characters are needed for basic patterns, but 500+ characters provide much more reliable results. The longer the text, the more closely it will match expected frequency distributions.
Why doesn't frequency analysis work on all ciphers?
Frequency analysis is effective against monoalphabetic substitution ciphers (where each letter always maps to the same letter). It doesn't work well on:
- Polyalphabetic ciphers (Vigenère, etc.) - use multiple alphabets
- Transposition ciphers - rearrange letters without substitution
- Modern ciphers - use complex mathematical operations
What are bigrams and trigrams?
Bigrams are two-letter combinations (TH, HE, IN), and trigrams are three-letter combinations (THE, AND, ING). These patterns are even more distinctive than single letters and can help confirm substitution guesses.
Can I analyze non-English text?
Yes! Every language has its own frequency distribution. However, this tool compares results to English frequencies. For other languages, you'd need to compare against that language's expected patterns.
Is my text stored or sent anywhere?
No. All analysis happens in your browser. Your text never leaves your computer, ensuring complete privacy. This tool works entirely client-side using JavaScript.