File Entropy Calculator (Shannon Entropy)
Drop in any file to measure its Shannon entropy, the average information per byte from 0 to 8. Low values mean repetitive or structured data, while values near 8 mean the bytes look random, which usually points to compression or encryption. The file is read entirely in your browser and never uploaded.
How to calculate file entropy
- Drag a file onto the box, or click browse to pick one.
- Read the entropy value in bits per byte and watch where it lands on the 0 to 8 gauge.
- Use the interpretation to judge whether the data is structured, compressed or encrypted.
Examples
A plain text log file
server.log (ASCII text)
Around 4.5 bits/byte: low to moderate, typical of human-readable text
An already-compressed archive
backup.zip
Around 7.99 bits/byte: very high, the bytes look random (compressed)
Frequently asked questions
What is Shannon entropy and what does it measure?
Shannon entropy is the average amount of information per byte, measured in bits per byte from 0 to 8. It is computed from how often each of the 256 possible byte values appears. A value of 0 means every byte is identical, while 8 means all 256 values are equally likely and the data looks completely random.
How does entropy reveal compression or encryption?
Compression and encryption both remove patterns and make the output bytes close to uniformly random, which pushes entropy near the 8 bits per byte maximum. So a file scoring above roughly 7.5 is likely already compressed or encrypted, while structured data and text sit much lower because they repeat predictable patterns.
Is my file uploaded anywhere?
No. The file is read and analyzed entirely in your browser using JavaScript. Nothing is sent to a server, so even sensitive files stay on your device.
Does the tool run fully in my browser?
Yes. All of the byte counting and the entropy math happen locally on your device. There is no network request, so the tool also works offline once the page has loaded.
Why is high entropy not a guarantee of encryption?
Entropy only measures the byte distribution, not meaning. Compressed archives, random data and encrypted blobs all score near 8, so a high value tells you the bytes are unpredictable but cannot prove which one it is. Treat it as a strong hint, not proof.
What entropy is normal for text versus binary files?
Plain English text is usually around 4 to 5 bits per byte, source code and structured formats like JSON or XML are similar, and uncompressed images vary. Files near 8 bits per byte are almost always compressed, encrypted or already random.
Related tools
File Hash Generator
Drop in a file to get its SHA-1, SHA-256, SHA-384 and SHA-512 checksums. Compare against an expected hash. Runs in your browser, the file never uploads.
Image Metadata Viewer
View an image's EXIF and metadata in your browser: camera make and model, dimensions, format, orientation, and whether GPS location is embedded. Private.
CRC32 Calculator
Calculate the CRC32 (IEEE 802.3) and Adler-32 checksum of any text. Live hex and decimal output that runs entirely in your browser.
Base64 File Encoder
Encode any file to Base64 and a data URI in your browser. Drop a file to get the raw Base64 and a ready data: URI to copy. Nothing is uploaded.
CBOR Decoder
Decode a CBOR file (RFC 8949) to readable JSON in your browser. Handles integers, byte strings, arrays, maps, tags, and floats. Nothing is uploaded.
CSV File Inspector
Inspect a CSV file in your browser: detect the delimiter, encoding and BOM, count rows and columns, guess the header, and preview sample rows. Private.