SHA256, SHA512, and MD5 hash generator for text and files
Switching Hash source between Text and File calculates five digests in one pass: MD5, SHA-1, SHA-256, SHA-384, and SHA-512. Text inputs encode as UTF-8 bytes and update automatically after a 120 ms pause, while SHA family digests run natively through the MDN SubtleCrypto.digest() API.
Streaming large files in 4 MB slices up to 1 GB
Hashing a large ISO image or release archive in one memory buffer can crash a browser tab. In File mode, the worker reads files up to 1 GB in 4 MB slices inside dev.worker.ts, updating a live progress percentage bar with a Cancel button if you change your mind mid-stream.
For MD5, an incremental RFC 1321 hasher processes each slice through a fixed 64-byte block buffer without copying the entire file into RAM. If you need to bundle multiple build artifacts into a single archive before computing its release digest, zip files and folders locally first.
Comparing expected SHA-256 checksums without uploading
Verifying a downloaded installer requires comparing its computed digest against the publisher’s reference string. Paste any expected value into Compare with a checksum and the matcher strips whitespace, ignores uppercase or lowercase differences, and removes prefixes such as sha256:.
When a match is found, the corresponding row highlights and displays a confirmation label such as Matches SHA-256.. If none of the five computed digests match, an inline warning alerts you immediately so corrupted or tampered downloads are caught before execution.
MD5 vs SHA256 and SHA-384 integrity verification
Choosing the right algorithm depends on whether the goal is guarding against accidental transmission errors or verifying cryptographic authenticity. While MD5 (128 bits) and SHA-1 (160 bits) remain common in legacy manifests, modern software distribution relies on the SHA-2 family defined in the NIST FIPS 180-4 Secure Hash Standard.
When MD5 and SHA-1 remain acceptable for accidental corruption
Both MD5 and SHA-1 carry an explicit checksums only, not for security label in the output list because practical collision attacks can forge two different files with identical digests. They are still useful for deduplicating local backups or verifying legacy checksum files where no adversary is involved.
SHA-256, SHA-384, and SHA-512 digest lengths under FIPS 180-4
SHA-256 produces a 64-character hex string (256 bits) and serves as the default standard for Linux ISOs, Docker layers, and Git commits. SHA-384 (384 bits) and SHA-512 (512 bits) offer even wider collision resistance and are widely used in Subresource Integrity (SRI) tags and high-assurance release pipelines.
| Algorithm | Digest length | Hex characters | HMAC supported | Primary use case |
|---|---|---|---|---|
| MD5 | 128 bits | 32 | No | Legacy file deduplication & accidental corruption checks |
| SHA-1 | 160 bits | 40 | Yes | Legacy Git object IDs & non-security checksums |
| SHA-256 | 256 bits | 64 | Yes | Download verification, API webhooks, and release manifests |
| SHA-384 | 384 bits | 96 | Yes | Subresource Integrity (SRI) & TLS certificates |
| SHA-512 | 512 bits | 128 | Yes | High-assurance binary verification & 64-bit platforms |
If a deployment pipeline or SRI attribute expects Base64 rather than hexadecimal output, encode binary digests as Base64 strings after inspecting the hex digest.
How does the HMAC secret key calculator work?
Checking HMAC with a secret key switches the calculator from unkeyed digests to keyed Hash-based Message Authentication Codes using the MDN SubtleCrypto.sign() HMAC Reference. Typing a shared secret into Secret key imports the UTF-8 key via crypto.subtle.importKey and signs your text or file stream locally.
Signing payloads with HMAC-SHA-1, SHA-256, SHA-384, and SHA-512
Webhook providers such as Stripe, GitHub, and Slack authenticate HTTP callbacks by computing HMAC-SHA256 over the raw request body using a webhook signing secret. Testing those signatures inside your browser avoids pasting production secrets into external web servers.
To generate a strong signing key before configuring a new webhook integration, create high-entropy authentication secrets in your browser and paste the result into Secret key.
Why MD5 is omitted when a secret key is active
Because MD5 is cryptographically weak for authentication and unsupported by SubtleCrypto HMAC signing, the MD5 row displays Not available with a key whenever HMAC with a secret key is checked with a non-empty key.
Tip: Toggle Uppercase when comparing against Windows
CertUtiloutputs or legacy manifest files that print hex digests in capital letters; the copy button automatically copies whichever case is displayed.
Troubleshooting UTF-8 text and terminal echo newline differences
One of the most frequent surprises when checking text hashes is getting a different SHA-256 digest in the browser than from a terminal command. Running echo "hello" | sha256sum appends a trailing 0x0A newline byte, whereas the Text box hashes the exact five bytes of hello via TextEncoder.
If you want your terminal output to match the browser digest, run printf '%s' "hello" | sha256sum so no newline is added, or press Enter at the end of the Text box if your target string includes a trailing newline. Every line ending (\n vs \r\n), space, and multi-byte Unicode character changes the resulting hash completely.
When generating unique request IDs or correlation tokens alongside webhook HMAC signatures, use the UUID generator to create random v4 or time-ordered v7 identifiers locally. Because every digest, key import, and checksum comparison runs in your browser tab, API keys, configuration files, and unreleased binaries stay private on your device with zero network uploads.