Back to feed
Dev.to
Dev.to
7/8/2026
The original title is "How Secure is Your Password? Calculating Shannon Entropy in the Browser"

The original title is "How Secure is Your Password? Calculating Shannon Entropy in the Browser"

Original: How Secure is Your Password? Calculating Shannon Entropy in the Browser

Short summary

The article explains how to measure password strength using Shannon Entropy rather than simplistic rule-based checks, providing the mathematical formula E = L × log2(R) where L is password length and R is the character pool size. It includes a vanilla JavaScript function that calculates entropy client-side and estimates brute-force cracking times based on different attack scenarios. The author promotes their free browser-based password analyzer tool at KandZ Tools, emphasizing that all processing happens locally without transmitting credentials.

  • Shannon Entropy (E = L × log2(R)) is a better measure of password strength than static character rules
  • JavaScript function calculates entropy by detecting which character sets are used and computing bits of randomness
  • Brute-force time estimates vary from milliseconds for <28-bit passwords to unfeasible for 128+ bit passwords

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more