In-browser magic-byte file inspector and SHA-256 verifier

Drop or select any file from your device to inspect its first 64 bytes in hexadecimal and ASCII, detect its true format from magic-byte signatures, flag extension spoofing mismatches, and compute its SHA-256 checksum locally—nothing is ever uploaded.

1. Select or drop a file to inspect locally

Drop any file here, or click to choose from your device

100% local inspection via FileReader & Web Crypto API. Zero bytes leave your browser.

Waiting for a local file selection…

2. Detected signature & integrity report

File name—
Exact size—
Declared extension & MIME—
Magic-byte signature match—
Extension vs. bytes check—
SHA-256 digest—

First 64 bytes hex dump (offset · hexadecimal · ASCII)

00000000  -- -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |Select a file...|

Why magic-byte inspection is essential for secure file uploads

When a user selects a file in an HTML <input type="file"> element, the browser populates the File.type property almost exclusively by looking up the filename extension in the operating system's registry—not by reading the bytes inside the file. If an attacker or a buggy client renames payload.png (or an executable script) to avatar.jpg, the browser reports image/jpeg in the Content-Type multipart header even though the file begins with PNG signature bytes (89 50 4E 47 0D 0A 1A 0A).

You can test this exact scenario right now: download wrong-extension-png-as-jpg.jpg from our Broken-File QA Test Set and drop it into the inspector above. The inspector reads the leading 64 bytes via Blob.slice(0, 65536).arrayBuffer(), identifies the 89 50 4E 47 PNG signature, and flags the mismatch against the .jpg extension.

Common multi-format container signatures to watch for

Frequently asked questions

Is my file uploaded to any server when I drop it into the File Inspector?
No. The inspector reads the file directly from your local disk memory using the browser's FileReader / Blob.slice() and Web Crypto APIs. You can disconnect from the internet after loading this page and the inspector will continue to work identically.
What is the largest file the inspector can hash with SHA-256 in the browser?
Header magic-byte inspection works on files of any size (even multi-gigabyte files) because it slices only the first 64 KB. Full-file SHA-256 hashing in browser memory is enabled for files up to 64 MB to keep tab memory usage responsive.

Operational transparency, verification and developer reference

For technical questions or feedback regarding SampleTestFiles, contact contact@sjwebtechwork.com. Every sample file, dataset, and diagnostic utility on this site follows strict reproducibility and privacy rules: