Calculate Shannon Entropy of a Text or Password
Compute the Shannon entropy (bits/char and total) of a text or password, in your browser.
H = −Σ p·log₂(p). Total entropy (bits) estimates brute-force difficulty. 100% local computation.
🔒 100% client-side — no data sent
Calculate the Shannon entropy in bits of any text or password to measure its randomness and strength. The computation runs 100% in your browser, so your password is never sent over the Internet.
What is it for?
- ▸ Assess how strong a password is before adopting it
- ▸ Measure the randomness of a key or token generated by your application
- ▸ Compare several password policies in bits of entropy
- ▸ Check the randomness of a string in a cryptographic context
FAQ
What is Shannon entropy?
Shannon entropy measures the average amount of information, or uncertainty, contained in a sequence of characters. Expressed in bits, it grows as the content becomes more unpredictable and varied.
How many bits of entropy make a good password?
A password is generally considered strong from around 60 to 80 bits of entropy, and very resistant above 100 bits. The higher the value, the more expensive a brute-force attack becomes.
How is Shannon entropy calculated?
You compute the frequency of each character, then apply the formula H = -Σ p(x) log2 p(x). The result, in bits per character, is multiplied by the length to get the total entropy of the string.