What this tool calculates
SHA-1 produces 160 bits, written as 40 hexadecimal characters. This page is intended for checking existing systems that still request SHA-1, such as older manifests and compatibility fixtures. A SHA-1 result cannot be compared directly with an MD5 value or a SHA-256 value, regardless of letter case.
Reproducing a historical digest requires the historical bytes, not just text that looks the same. A copied newline, an editor's byte-order mark, or a different Unicode representation can change the answer. Use file mode for the actual saved artifact rather than copying the document body into the text box.
SHA-1 has known collision weaknesses. Its presence in an older protocol is not an endorsement for a new design. Prefer a modern algorithm where you control the format, and use a keyed authentication construction when the task requires proof of a shared secret rather than a plain fingerprint.
Worked example
UTF-8 · abc · SHA-1
a9993e364706816aba3e25717850c26c9cd0d89d
How to calculate and compare
- Enter the exact text in Input text, or choose Example to load
abc. Text is encoded as UTF-8; spaces and line endings are preserved. - In single-text mode, non-empty input up to 64 KiB updates after a short pause. Click Generate hash for empty input or larger text. Changing the input clears the previous result.
- To check a saved file instead, open File checksum, confirm the algorithm, and choose or drop the file. File mode reads its original bytes and starts automatically.
For line-by-line results, enable One hash per line, choose whether to include empty lines, then click Generate hash. Line mode does not calculate automatically. CRLF, LF and CR separate records and are not included in each line's digest. Duplicate lines retain their original line numbers.
Paste only the complete hexadecimal reference into Compare expected value (optional) and click Check. Letter case and surrounding pasted whitespace are ignored; internal spaces and the wrong length are rejected. Copy retains the full result. TXT and CSV exports include identifiers, algorithm names and digests, not source text or secret keys.
Limits, privacy and next steps
Text is limited to 10 MiB and line mode to 10,000 records, including empty records before filtering. Files are limited to 50 queue entries and 1 GiB each, read sequentially in 2 MiB chunks. These limits protect browser resources; they do not guarantee fast processing on every phone. Cancel if needed. Calculation takes place in the browser, while normal page and asset requests still reach the hosting service.
Reproducing SHA-1 without confusing it with a Git object ID
This page hashes the exact text or file bytes. In a SHA-1 Git repository, an object ID is not simply SHA-1 of the visible file contents: Git includes an object header, and filters can also affect the bytes used for a blob. A difference from git hash-object therefore does not by itself indicate a faulty SHA-1 implementation.
For a legacy integration, first establish whether its field expects a raw file digest, an object identifier or a digest inside a larger signed structure. Reproduce raw SHA-1 values here; use Git's own object commands for repository IDs. Keep the protocol's algorithm name with the result rather than silently replacing SHA-1 with a longer hash.
Raw file SHA-1 and Git blob SHA-1
For the three bytes abc, Git's SHA-1 blob representation starts with the bytes blob 3 followed by a zero byte. Do not type a visible backslash-zero into the editor: this example explains the object representation, not a Git mode in this tool.
SHA-1 / raw abc:
a9993e364706816aba3e25717850c26c9cd0d89d
SHA-1 / Git blob (62 6c 6f 62 20 33 00 61 62 63):
f2ba8f84ab5c1bce84a7b441cb1959cfc7093b7f
Common SHA-1 compatibility traps
| Observed problem | Why it happens | What to do |
|---|---|---|
| A Git object ID does not match | Git hashes an object representation, not just raw file contents | Use git hash-object and the repository's filter rules. |
| The reference is 64 hex characters | It is not a full plain SHA-1 digest | Check whether the system specifies SHA-256. |
| A legacy file fails after editing | Saving may change newlines or encoding | Hash the original artifact before changing it. |