← Back to Work

// 21 / CYBERSECURITY  ·  28 Oct 2026

Entropy Meter — How Strong
Is This, Really?

TypeBrowser tool · live
StackSingle HTML file · vanilla JS
Network callsNone — nothing typed leaves the page
ApproachPattern-aware, zxcvbn-style

// the idea

Most strength meters measure the wrong thing

The password meter on a typical sign-up form checks whether you used a capital letter, a digit and a symbol, and turns green when you have. By that measure Summer2024! is excellent. By the measure an attacker uses — how many guesses until I find it — it is one of the worst passwords you could choose, because "common word, recent year, one symbol on the end" is the single most popular pattern in every breached-password list ever published.

The honest measure is entropy: the size of the haystack the attacker has to search, expressed in bits. And the subtle part is that the haystack is only as big as the attacker's model of you. If you chose at random, every character is a full roll of the dice. If you chose like a human — a word, a name, a date, a keyboard row — the attacker's guesser knows that too, and the haystack collapses.

Entropy Meter shows both numbers side by side. The naive figure most meters report, and the real figure after the patterns are found and charged at what they actually cost an attacker. The gap between them is the whole lesson.

A concrete example

Take Summer2024!. Eleven characters drawn from an alphabet of lowercase, uppercase, digits and symbols — 95 possibilities per position. The naive calculation is 11 × log₂(95) ≈ 72 bits, which is a haystack of four sextillion and would take a GPU rig longer than the age of the universe to search.

Now look at it the way a cracking tool does. "summer" is in the top hundred passwords on earth — finding it costs a few dozen guesses, not twenty-six to the sixth. "2024" is a year; there are about a hundred plausible ones. The exclamation mark on the end is one of a handful of symbols people append. Charged honestly:

entropy meterSummer2024!
top-100 password "summer"        ≈ 6 bits   (~60 guesses, not 26^6)
year 2024                        ≈ 7 bits   (~120 plausible years)
1 character outside any pattern  ≈ 5 bits
arrangement of the parts         ≈ 2 bits
──────────────────────────────────────────
naive   72 bits  →  real   20 bits  →  weak

online, rate-limited      3 hours
offline, bcrypt           2 minutes
offline, one GPU          instant

Compare correct horse battery staple: four ordinary dictionary words that a per-character meter would score as mediocre (all lowercase, no digits). Scored the way it would be attacked — against a word list — it is around 55 bits and holds up to everything short of a cluster, and it is far easier to remember than Summer2024!. Length and randomness beat character classes every time, and the tool is built to make that obvious in one glance.

Try it — nothing leaves your browser

Click the sample buttons under the box: Summer2024!, qwerty123, the xkcd passphrase, a truly random string, and a fake API key. Then type your own made-up ones and watch the two numbers move.

Open Entropy Meter →

// what it does

Three panels

01

Secret

One input, masked by default with a show/hide toggle. Underneath, the string is drawn character by character, coloured by class (lowercase, uppercase, digit, symbol), with every span that belongs to a detected pattern underlined in red — so you can see where the weakness is, not just that there is one. If the input matches the shape of a real credential — an Anthropic or OpenAI key, an AWS access key, a GitHub or Slack token, a JWT, a private-key block — a banner says so and tells you to rotate it, because pasting live secrets into web pages is the habit that gets people breached, however trustworthy the page.

02

Strength

The big number is real bits; a needle on a red-to-green scale gives the rating in a glance. The text beneath explains the verdict and spells out both estimates, and calls out the gap when it's large. Beside it, the tiers panel turns bits into time-to-crack for four realistic attackers: a rate-limited website at 100 guesses a second, an offline attack on a slow hash like bcrypt at 10,000, a single gaming GPU against a fast hash at ten billion, and a cluster at ten trillion. The same secret is "years" in one column and "instant" in another, which is the point: there is no such thing as strong without saying against what.

03

Why

Every pattern found, named in plain English with its bit cost and the number of guesses it would actually take versus the number a naive meter assumes. Beside it, the composition: length, alphabet size, naive and real bits, and which character classes are present. It's the receipt for the score.

// how it was built

Build notes

The approach is zxcvbn's, in miniature

Dropbox's zxcvbn library established the right way to do this a decade ago: find the patterns an attacker would exploit, cost each at the number of guesses it really takes, and sum the bits for the non-overlapping set that covers the most of the string. This is a from-scratch, single-file version of that idea with a few hundred dictionary entries instead of a few hundred thousand. It will miss obscure words a full wordlist would catch, so its real-bits figure is an upper bound on the truth — but the common failures, which are nearly all the failures, it catches.

Six detectors, then a greedy cover

Dictionary words (including leet-speak substitutions and capitalisation variants, costed higher), years and dates, ascending or descending sequences, keyboard walks along any row of a US layout, single-character runs, and repeated chunks. Each detector emits candidate spans with a guess count. The spans are sorted longest-first and selected greedily so that no two overlap; whatever characters remain are charged at full random strength for their own alphabet.

entropy.htmljavascript
// candidate spans from every detector, then the longest non-overlapping set
pats.sort((a,b) => (b.end-b.start) - (a.end-a.start) || a.start - b.start);
const chosen = [];
for (const p of pats)
  if (!chosen.some(c => p.start < c.end && c.start < p.end)) chosen.push(p);

// real bits = Σ log2(guesses per pattern) + leftover chars at full strength
real = chosen.reduce((b,p) => b + Math.log2(p.guesses), 0)
     + loose * Math.log2(charsetSize(looseChars));

Passphrases are scored as words, not letters

Three or more plain words separated by spaces switch the scorer into passphrase mode, where each word is worth log₂ of a diceware-sized list (7,776 entries, about 12.9 bits) rather than being penalised for having no digits. That is how a passphrase is attacked in practice, and it's why four random words score well while P@ssw0rd scores three bits.

The credential detector exists because of the privacy promise

The page makes no network calls — the tab's network panel is empty. But a tool that invites you to type secrets has a duty beyond its own behaviour: it should discourage the reflex. So recognisable key formats trigger a banner that says, in effect, "I didn't send this anywhere, but you should still rotate it." The fake-key sample button is there so people can see the banner fire without pasting a real one.

Lines
~310 incl. CSS
Dictionary
~600 words, names, top passwords
Detectors
6 + credential formats
Network calls
None

// what this demonstrates

Why this matters

Credential stuffing and password reuse are still behind most account takeovers, and a large part of that is a decade of sign-up forms teaching people that a capital letter and an exclamation mark make them safe. A meter that shows the attacker's view instead — and shows it against four kinds of attacker — is a small correction to a very widespread piece of bad advice.

It also fits the security thread on this site. The hardening pass and the RAG red-team were both about assuming the attacker is competent and building for that. This is the same assumption, applied to the one secret everybody still types by hand.

Where it could go next

Bigger wordlist, lazily

Fetch a 30K-word list on demand when the user wants a tighter bound, keeping the default page dependency-free.

Breach check, done right

k-anonymity lookup against a breached-password range API — send five hex characters of a hash, never the secret.

Passphrase generator

A button that makes six random words from a list, scores them live, and shows they beat the thing you just typed.

Policy linter

Paste a password policy ("8+ chars, one capital, one digit") and see the weakest password that satisfies it.

Source

The tool is the source — view the page and it's all there, MIT. entropy.html