A checksum gives you a repeatable way to verify that a file arrived unchanged after an upload, download, backup, or object-storage transfer. This checklist explains when to use SHA-256, SHA-512, MD5, or a provider's built-in checksum, then shows browser, command-line, and CI workflows you can reuse for large files and release artifacts.
Overview
A checksum is a short value calculated from a file's bytes. If the file changes, its calculated value will normally change as well. Comparing a sender's checksum with a receiver's checksum is therefore a practical file integrity check: both sides independently process the file and compare the results.
Checksums do not prove who created a file, whether its contents are safe, or whether the file is appropriate for a particular application. They answer a narrower question: do these two files produce the same digest under the same algorithm? For sensitive transfers, pair the checksum with an authenticated channel, access controls, malware scanning, and an appropriate signature or key-management process.
| Method | Best use | Important qualification |
|---|---|---|
| SHA-256 | General-purpose upload verification, release files, backups, and audit records | A strong default when you need a modern, widely supported digest |
| SHA-512 | Workflows that standardize on the SHA-2 family and can store a longer digest | Produces a longer value; consistency across tools matters more than choosing between SHA-256 and SHA-512 for routine integrity checks |
| MD5 | Legacy compatibility or quick accidental-corruption detection where security is not the goal | Do not treat MD5 as protection against deliberate substitution or collision attacks |
| Cloud or storage-provider checksum | Verification handled during an object upload, multipart transfer, or download | Behavior, supported algorithms, and multipart semantics vary by provider and client |
For a new workflow, SHA-256 is usually an understandable baseline. Use the same algorithm at both ends, record the exact filename and file size, and preserve the original checksum beside the transfer record. If an object-storage service calculates a checksum for you, confirm whether it represents the complete object, an individual part, or a provider-specific composite value before comparing it with a locally generated digest.
Checklist by scenario
1. Browser-based verification
A browser-based hash generator or file-integrity utility can be useful when you do not have shell access. Choose a tool that processes the file locally when that is required by your privacy policy. Avoid uploading confidential files to an unfamiliar third-party service merely to calculate a digest.
- Identify the exact file, including its extension and version.
- Confirm that the file has finished downloading or uploading before hashing it.
- Select the algorithm named by the sender or transfer procedure, such as SHA-256.
- Calculate the digest without opening and resaving the file in an editor.
- Compare the result character by character, ignoring only documented formatting such as whitespace or a label like
SHA256:. - Record the result, file size, source, destination, algorithm, and verification time.
A browser tool is convenient for occasional checks, but it is less reproducible than an automated command or CI step unless you document the tool and its operating conditions.
2. Command-line verification
Command-line tools are suitable for repeatable checks on servers, build machines, and downloaded artifacts. On Linux, macOS, and other Unix-like environments, common commands include:
sha256sum path/to/file.zip
sha512sum path/to/file.zip
md5sum path/to/file.zip
Some systems provide the shasum command instead:
shasum -a 256 path/to/file.zip
shasum -a 512 path/to/file.zip
On Windows PowerShell, use:
Get-FileHash .\file.zip -Algorithm SHA256
Get-FileHash .\file.zip -Algorithm SHA512
Compare the output with a checksum supplied through a trusted channel. If a checksum file contains a filename and digest, use the verification mode supported by your platform rather than copying values manually. Also check that the command references the intended path; a correct hash of the wrong file is still a failed verification.
3. Upload API and object-storage verification
For an upload API, calculate the local digest before sending the file, then verify the stored or downloaded copy after the server confirms completion. The API response may include an object identifier, an entity tag, a provider checksum, or application metadata. Do not automatically assume that an entity tag is a SHA-256 value; its meaning can depend on the storage system and upload method.
For multipart or resumable uploads, keep the part structure and final-object verification separate. A part checksum can show that an individual chunk arrived correctly, while a final checksum confirms the reconstructed object. This distinction is especially important when retries, reordered parts, or server-side composition are involved. See the resumable file uploads checklist when designing this workflow, and review the multipart form-data testing guide for request-level checks.
4. CI/CD and release artifacts
For builds, backups, or releases, make verification a pipeline step rather than a memory task. A simple pattern is:
- Build or select the artifact.
- Calculate its SHA-256 or SHA-512 digest.
- Publish the artifact and a clearly named checksum record.
- Download the artifact in a clean verification job.
- Calculate the digest again and fail the job if it differs from the expected value.
Keep the algorithm, expected value, artifact name, and version together. For higher-assurance release workflows, use a signing system in addition to a checksum. A checksum confirms equality; a signature can help establish authenticity when its key and verification process are managed correctly.
Reusable transfer record
File name: example-release.zip
Version or ID: 2026.11.1
Source: build job / upload endpoint / storage bucket
Destination: deployment host / backup location
Size in bytes: [record exact size]
Algorithm: SHA-256
Expected digest: [sender-provided value]
Calculated digest: [receiver-generated value]
Upload completed: [UTC date and time]
Verified by: [person, job, or system]
Result: PASS / FAIL
Notes: [retry, multipart upload, warning, or follow-up]
What to double-check
- Algorithm agreement: SHA-256 and SHA-512 produce different values. Confirm the algorithm before comparing.
- Complete file: Hash the final file, not a partial download, temporary file, compressed stream, or one multipart segment unless that is explicitly what the procedure requires.
- Exact bytes: Opening, converting, line-ending normalization, recompressing, or editing a file can change its digest even when the visible content appears similar.
- Filename and size: A digest is not a substitute for identifying the object. Record the path, version, size, and storage key as well.
- Provider semantics: Check the current storage documentation for supported algorithms, multipart behavior, server-side encryption effects, and whether a returned value is a full-object checksum.
- Trust of the expected value: A checksum copied from an untrusted location cannot establish integrity against that same source. Prefer an authenticated channel or a signed manifest.
- Download and upload limits: If a transfer is truncated or rejected before completion, troubleshoot the transport separately. The file upload size reference and browser compatibility reference can help locate configuration limits.
Common mistakes
Using MD5 as a security control. MD5 can remain useful for compatibility and accidental-error detection, but it should not be the sole protection for a release or a deliberately adversarial transfer. Prefer SHA-256 or SHA-512 for new integrity records.
Comparing the wrong representation. A checksum of a ZIP archive is not the checksum of the files inside it. Likewise, a base64 string, an encrypted object, and its decrypted output are different byte sequences and have different digests.
Trusting a familiar-looking storage field. A value labeled “ETag” or “checksum” may have provider-specific rules. Read the service documentation and test the exact upload path, particularly for multipart transfers.
Failing silently in automation. A script should return a nonzero exit status when the expected and calculated values differ. Print enough context to identify the artifact, but avoid exposing secrets or sensitive filenames in shared logs.
Hashing sensitive files through an unnecessary online service. A browser-based developer tool can be helpful, but local processing is the safer default for confidential documents, credentials, customer data, and proprietary builds.
When to revisit
Revisit this checklist before a large transfer, backup restore, production deployment, or release publication. It should also be reviewed when your workflow changes: moving to a different object-storage provider, enabling multipart uploads, changing CI runners, replacing a browser utility, or introducing client-side encryption.
During a periodic planning or maintenance cycle, confirm that your scripts still support the selected operating systems, that the storage provider's checksum behavior matches your assumptions, and that expected values are retained with the correct artifact version. If a verification fails, do not immediately regenerate the expected checksum and mark the transfer successful. First preserve the original record, compare file sizes, inspect transfer logs, confirm the object key, and retry from a known-good source. A mismatch may indicate truncation, an incorrect path, a changed build, or a more serious integrity problem.
For each recurring workflow, finish with this short action list: choose one approved algorithm, calculate the digest at the source, verify the completed destination object, record the result, and escalate any mismatch before using the file. That habit turns a one-time checksum command into a durable file integrity workflow.