A checksum is a value calculated from data so a recipient can compare whether the bytes appear unchanged. This tool computes SHA-family digests for typed text or a selected file using the browser's Web Crypto digest API. It displays a lowercase hexadecimal result, with file mode also showing the file name and selected algorithm. A matching checksum can help detect accidental corruption when the expected value comes from a trustworthy source; it does not prove that the source is authentic or that a file is safe to open. Distinguish integrity comparison from malware scanning and digital signatures.
Enter text or choose a file in the upload control, select SHA-1, SHA-256, SHA-384, or SHA-512, and press Generate Checksum. If a file is selected, the action hashes that file; otherwise it converts the text field to UTF-8 bytes and hashes those bytes. SHA-256 is selected initially. Clear empties the text and output and clears the selected-file state. The result can be copied or downloaded as checksum.txt. If both text and a file are present, file mode takes precedence because the action handler checks for a selected file.
For a known example, enter `hello`, leave SHA-256 selected, and generate. The resulting digest is `2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824`. Selecting a file with those five bytes should produce the same digest, while a newline at the end of the text changes it. This comparison illustrates that text mode hashes UTF-8 encoding and file mode hashes raw file bytes; visually similar content may differ because line endings, encodings, or metadata differ.
SHA-1, SHA-256, SHA-384, and SHA-512 are available, and their outputs are represented as hex. The tool calculates one selected algorithm at a time and does not provide a field for pasting an expected value or automatic match status. SHA-1 remains an option for compatibility but has known collision weaknesses for security-sensitive decisions. Use SHA-256 or the algorithm specified by the software publisher. File Hash Checker calculates all four choices and can compare a supplied reference against its results.
Use checksum generation to compare a text fixture before and after transfer, document a local build artifact, or produce a digest to compare with a trusted release listing. Hash Generator offers a simpler text-only workflow; File Hash Checker is more convenient when one file needs several digests and an expected-hash comparison; HMAC Generator adds a shared secret when authenticity is needed between parties. A checksum alone cannot tell whether a change was malicious, and it cannot identify who created the expected value.
Digest computation occurs in the browser from the text bytes or `file.arrayBuffer()`; the component code has no remote digest endpoint. Files are loaded into browser memory, so very large files can use substantial device resources or fail due to memory constraints. The component does not show a progress indicator during the checksum operation or catch every failure path. Do not treat local processing as a guarantee about the site's broader logging or privacy behavior; avoid selecting confidential files unless your policy permits it.
When checking a download, obtain the expected digest from an independent trusted channel, confirm the exact algorithm, and compare the entire hex string. If output differs, re-download from the authorized source and inspect transfer or line-ending changes rather than assuming either copy is genuine. A plain hash is not password storage, encryption, or identity verification. For authenticity, use a digital signature or authenticated mechanism designed for that purpose and validate it with trusted keys.
The result format depends on whether a file has been selected. File mode includes the browser-provided filename, chosen algorithm, and digest; text mode returns only the digest. If both inputs contain values, the selected file takes precedence, so clear the file picker when you intend to checksum text. Text is encoded as UTF-8 before hashing, which means copying a string from a terminal or editor with an added newline can create a different checksum than expected.
A practical record of a checksum should include the algorithm name alongside the digest, because two algorithms produce different lengths and values for identical data. The interface labels a selected file result with its algorithm and provides a generic text output for the text path. When recording the value elsewhere, include a trustworthy filename or version as context without assuming the filename is part of the digest. Renaming a file does not alter its bytes and therefore does not change its hash.
If you need to verify integrity against a reference, use a source that is independent from the file's download channel. A compromised mirror could replace both the file and a nearby checksum text file. Signed manifests, authenticated release notes, or a separately trusted maintainer channel provide better provenance. This generator performs the digest calculation but does not fetch a reference, verify signatures, inspect the file type, or tell you whether content is safe to open.
When checking entered text, consider whether the intended value includes invisible characters such as a trailing line break or non-breaking space. The text area preserves the typed content, and the digest is computed from its UTF-8 bytes. For a controlled test, use a short known phrase first, then compare the output with an independent implementation using the same exact bytes. This can separate an encoding mismatch from an algorithm mismatch before you troubleshoot a larger payload.