Shannon Entropy Calculator
Calculate the Shannon entropy of strings in bits per character and in total, next to a character-pool estimate, to compare tokens, keys and passwords.
Free · No sign-up · Your inputs stay in your browser
Input
Calculate the Shannon entropy of strings
Output
4 strings
| String | Length | Bits per char | Total (observed) | Pool estimate |
|---|---|---|---|---|
| correct horse battery staple | 28 | 3.495 | 97.9 | 164.7 |
| Tr0ub4dor&3 | 11 | 3.278 | 36.1 | 72.3 |
| kQ3n0gTgPm0w8r0oQ1m8m8t0QF2VZp2y | 32 | 4.179 | 133.7 | 190.5 |
| aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 33 | 0.000 | 0.0 | 155.1 |
Shannon entropy measures how evenly the characters of this particular string are spread, in bits per character; multiplied by the length it gives the information content of the string as observed. The pool estimate assumes every character was drawn at random from the character classes present, which is an upper bound for random tokens and badly overestimates human passwords: correct horse battery staple is about 44 bits as four random words. Secret scanners use high per-character entropy to spot keys in code.
Runs in this browser. Nothing you paste is sent to a server.
About this tool
Method, assumptions, practical next steps, and limits.
Reading the numbers
A random 32-character base64 token has close to 6 bits per character and about 190 bits in total; a string of one repeated character has 0. Secret scanners such as truffleHog flag high-entropy strings in code because random keys stand out from words.
Not a password strength meter
Both numbers describe the string, not how it was chosen. "correct horse battery staple" scores well on characters but has about 44 bits as four words picked at random from a 2,048-word list, and a human password that looks random often follows a guessable pattern. The password strength checker estimates guessing resistance instead.