Skip to content
TextArray
100% local

Shannon entropy calculator

Measure how many bits of information each character or word of your text carries.

Input

Shannon entropy calculator

Shannon entropy is the standard measure of information density: how many bits, on average, each symbol of a text carries. A string of one repeated character carries zero bits per character — totally predictable. Uniformly random symbols from an alphabet of 8 carry exactly 3. English prose typically lands around 4 bits per character before compression. Paste any text and this tool reports the entropy, the total information content in bits, the symbol and alphabet counts, the uniform maximum for that alphabet and the redundancy — how far below the maximum the text sits.

Entropy shows up everywhere once you look. Security teams eyeball it to spot hardcoded secrets: API keys and random tokens score near the maximum, while ordinary identifiers score low — many secret scanners are little more than an entropy threshold. Compression is bounded by it: a text's total bits are the floor any lossless compressor can approach. And in wordlist or password work, comparing candidate strings by entropy is a quick first filter, though for actual password strength the dedicated password checker models attacker behavior, which raw entropy does not.

The options change what counts as a symbol. Characters mode measures the code-point distribution, with switches to fold case and to leave whitespace out. Words mode measures the word distribution instead — a useful vocabulary-diversity signal for prose, where repeated words drag the entropy down.

Everything runs locally in your browser — the text you measure never leaves your device.

FAQ

What does the bits/char number actually mean?
It is the average information per character given the text's own letter frequencies: −Σ p·log₂(p). Zero means fully predictable (one repeated character); the maximum is log₂ of the alphabet size, reached only when every character is equally frequent.
Why is high entropy a hint that a string is a secret key?
Random tokens use their whole alphabet nearly uniformly, so they sit close to the theoretical maximum. Words and identifiers reuse a few characters heavily and score far lower. Secret scanners exploit exactly this gap — a threshold around 4.5 bits/char over base64-looking strings catches most keys.
What does redundancy mean?
The percentage gap between the measured entropy and the uniform maximum for the same alphabet: 1 − H/log₂(alphabet). It is a rough indication of how compressible the text is — high redundancy means a lossless compressor has a lot to squeeze.
Is text entropy the same as password strength?
No. This tool measures the character distribution of the string itself, not how guessable it is — "Password123" has decent character entropy but falls to a dictionary in milliseconds. Use the password strength checker for that question.
Is my text uploaded anywhere?
No. The measurement runs entirely in your browser and your text never leaves your device.