Shannon Entropy Calculator

Measure the Shannon entropy in bits per byte of any text or dropped file — a reading of 7.5 or above suggests encrypted or compressed data. Free, no upload.

Or drop a file here to measure its raw bytes (any type)

4.4877bits per byte · of 8 max
Total entropy: 197.46 bitsSize: 44 bytesUnique bytes: 29 / 256

Too short to classify: 44 bytes can read at most 5.46 bits per byte, and even random data seldom reaches 7.5 under about 512 bytes. At this length the figure cannot tell text from random data.

Byte frequency
ByteCharCount
0x20·8
0x6Fo4
0x65e3
0x68h2
0x72r2
0x75u2
0x2E.1
0x54T1
0x61a1
0x62b1
0x63c1
0x64d1
0x66f1
0x67g1
0x69i1
0x6Aj1
0x6Bk1
0x6Cl1
0x6Dm1
0x6En1
0x70p1
0x71q1
0x73s1
0x74t1
0x76v1
0x77w1
0x78x1
0x79y1
0x7Az1

🔒 Entropy is computed entirely in your browser — your text and files are never uploaded.

What Shannon entropy measures

Shannon entropy quantifies how unpredictable a stream of bytes is. This tool counts how often each of the 256 possible byte values appears in your input and applies the information-theory formula H = −Σ p·log2(p) introduced by Claude Shannon to report the average information content in bits per byte. The scale runs from 0 to 8: input made of a single repeated byte scores 0 because it is perfectly predictable, while bytes spread evenly across all 256 values reach the maximum of 8. Text is UTF-8 encoded before it is measured, and a dropped file is analyzed as its raw bytes. The counts behind the figure are on the page too: a byte-frequency table listing every value that occurred with its hex code and how many times it appeared, the number of distinct byte values out of 256, and a Decimals field that sets how many places the bits-per-byte reading carries.

How to read the result

Entropy is a fast, format-agnostic way to guess what kind of data you are looking at. Ordinary prose, source code and structured formats such as JSON usually land between 3.5 and 6 bits per byte because a handful of characters dominate, while dense encodings like Base64 climb higher. Encrypted or compressed data has almost no statistical structure, so it packs close to the 8-bit ceiling — a reading above 7.5 bits per byte is a strong hint that a blob is ciphertext, a compressed archive or random key material rather than plain text. It is not a secret scanner, though: a key or token written as hex or Base64 can never reach 7.5, because hex holds at most 4 bits per character and Base64 about 6, so the tool names that ceiling instead — scanners compare a string against its own alphabet. And the 7.5 reading only applies to about half a kilobyte or more; shorter input is reported as too short to classify.

Frequently asked questions

What does bits per byte mean?

It is the average amount of unpredictable information carried by each byte, on a scale from 0 (every byte identical) to 8 (every byte value equally likely). Multiply it by the length in bytes to get the total entropy in bits.

Why does encrypted or compressed data score close to 8?

Encryption and compression both strip out the statistical patterns that make data predictable, so every byte value becomes roughly equally likely. That flat distribution is exactly what maximises Shannon entropy, which is why a reading above about 7.5 bits per byte often signals ciphertext or a compressed archive rather than plain text.

Is this the same as password entropy?

Not quite. Password-strength meters estimate entropy from the size of the character pool and the length you chose. This tool measures the actual byte-frequency entropy of the data you provide, which is the information-theory definition and is better suited to classifying files or opaque blobs.

Are my text and files uploaded?

No. Everything is read and measured locally in your browser with JavaScript — your text and any dropped file never leave your device.