Shannon Entropy & Frequency Analyzer
Measure the Shannon entropy of text or bytes — how much information, in bits, each symbol carries on average. Entropy is −Σ pᵢ log₂ pᵢ over the symbol distribution: a string of one repeated symbol has 0 bits, an even mix of four symbols has 2 bits/symbol, and 16 equally-frequent symbols have 4 bits/symbol. Useful for sizing the randomness of passwords and tokens, gauging how compressible data is, or just inspecting a text's symbol spread. Choose how to slice the input into symbols — UTF-8 bytes, Unicode code points, UTF-16 code units, or user-perceived graphemes. Everything runs locally in your browser.
Symbol frequency
Shannon entropy H measures the average information per symbol. For a symbol with probability p, its surprise is −log₂ p bits; H is the probability-weighted average over all symbols. Max possible is log₂ k where k is the number of distinct symbols — reached only when every symbol is equally likely. Efficiency (H / Hmax) shows how close the distribution is to that ideal; low efficiency means a few symbols dominate. Total information is H × N, an estimate of how many bits the input would take to encode optimally. The symbol mode controls the unit: UTF-8 bytes match file/compression and password-strength conventions; Unicode code points treat one character as one symbol; UTF-16 code units expose JavaScript's string representation; graphemes count what a reader perceives as a single character (via Intl.Segmenter). Note H only reflects the symbol frequency distribution, not ordering — a shuffled string has the same entropy. Everything runs locally — nothing leaves your browser.