What a hash is
A hash function maps input bytes to a fixed-length digest. The same bytes produce the same digest. A changed input will produce a different digest with very high probability, but collisions are theoretically possible because unlimited possible inputs map to a limited set of digest values.
"hello" → SHA-256 → 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
"Hello" → SHA-256 → 185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969
Hashing is not encryption. Encryption is designed to be reversed with the correct key; a hash is used as a compact digest and is not decrypted. Short or predictable inputs can still be guessed by hashing possible values and comparing the results, so a digest should not be described as impossible to reverse.
SHA-1, SHA-256 and SHA-512 use the browser's Web Cryptography API inside a Web Worker. MD5 uses the existing client-side js-md5 implementation in that Worker. ToolMint does not upload the text or file.
When to use each algorithm
| Algorithm | Output size | Appropriate use | Important limitation |
|---|---|---|---|
| MD5 | 128 bits | Matching a legacy checksum or detecting accidental transfer errors in a non-adversarial workflow. | Do not use where collision resistance, authentication or signatures are required. |
| SHA-1 | 160 bits | Matching a legacy digest when an existing system requires SHA-1. | NIST has deprecated SHA-1 and disallows it for new digital signatures. |
| SHA-256 | 256 bits | File or text integrity checks when the expected digest comes from a trusted source. | A raw unkeyed digest does not authenticate the source. |
| SHA-512 | 512 bits | SHA-2 workflows that specifically require a 512-bit digest. | It is not a password-storage function by itself. |
FIPS 180-4 defines SHA-1 and the SHA-2 family, including their digest lengths. RFC 6151 explains why MD5 is unacceptable where collision resistance is required while allowing a narrower role for accidental-error detection. NIST's SHA-1 transition guidance explains its deprecation.
Integrity is not authentication
A SHA-256 or SHA-512 digest can show whether your bytes match a trusted expected value. The expected digest must come through a trustworthy channel. If an attacker can replace both the file and the published digest, a matching unkeyed hash does not prove who created the file or whether it is authorized.
HMAC and digital signatures are separate cryptographic constructions. HMAC combines a hash algorithm with a secret key. A digital-signature scheme uses public-key cryptography and may hash a message as one step. This tool generates raw digests only; it does not create HMAC values, sign files or verify signatures.
Never use raw hashes for password storage
General-purpose hashes are intentionally fast, which makes large-scale password guessing cheaper. Password storage requires a unique salt and a deliberately costly password-hashing or password-derivation function with parameters selected for the deployment.
NIST SP 800-63B describes salted, costly password verification. RFC 9106 specifies Argon2, including Argon2id, and RFC 7914 specifies scrypt. The right algorithm and parameters depend on the application and should be reviewed as security guidance evolves.
How text and files are processed
Text is encoded as UTF-8 without trimming or Unicode normalization. Spaces, emoji, composed and decomposed Unicode, and LF versus CRLF line endings therefore affect the digest. File mode hashes the file's exact bytes regardless of its filename or MIME type.
The expensive work runs in a browser Worker so the interface remains responsive. ToolMint accepts up to 5 MiB of UTF-8 text or one file up to 50 MiB. These are ToolMint operational limits for predictable browser memory use, not limits imposed by the hash standards.
What a good integrity check looks like
- Obtain the expected SHA-256 or SHA-512 digest from a source you trust.
- Select the downloaded file in the File tab.
- Compare the generated digest with the trusted value.
- Treat a mismatch as evidence that the bytes differ. A match confirms byte equality for this comparison; it does not independently authenticate the publisher.
The Compare tab performs a case-insensitive text comparison after trimming surrounding whitespace. It does not inspect a file or provide additional cryptographic verification.
Common mistakes
- Using MD5 or SHA-1 for a new collision-resistant workflow. Keep them for narrow legacy compatibility where their limitations are understood.
- Trusting a digest delivered beside an untrusted file. Obtain the expected digest through a source that an attacker cannot replace at the same time.
- Hashing passwords with raw SHA-256 or SHA-512. Use a suitable salted and costly password function instead.
- Assuming a digest authenticates its source. Use an appropriate HMAC or digital-signature system when authenticity is required.
- Changing text before comparison. Whitespace, line endings and Unicode representation are bytes too, so normalization must be deliberate and consistent.
Privacy and browser limits
Hashing and comparison happen locally in the browser. The tool does not put entered text, file contents, filenames, compare values or generated digests into ToolMint analytics payloads. Inputs and results remain in memory until you replace them, reset the tool or close the page.
The 5 MiB text and 50 MiB file limits reduce excessive memory use across phones and desktop browsers. They do not imply that every device will process a maximum-size input at the same speed. For larger files or automated workflows, use a trusted operating-system or command-line checksum utility.