How to Use the SHA-1 Hash Calculator
- Type or paste the text you want to hash into the input field.
- The 40-character hex digest appears live below the buttons.
- Click Copy to put the digest on your clipboard.
- Empty input produces the canonical SHA-1 of zero bytes (da39a3ee5e6b4b0d3255bfef95601890afd80709).
SHA-1 produces a 160-bit (40 hex character) digest using the Merkle-Damgård construction. It was the workhorse hash of the late 1990s and 2000s, but practical collision attacks (Google's SHAttered in 2017) mean you should not use it for digital signatures or anything an attacker could influence.
How the SHA-1 Hash Calculator Works
It remains useful for non-adversarial integrity checks: file fingerprints, content-addressed storage like git objects, and quick deduplication. This calculator uses the browser's Web Crypto API directly, so the digest you see is the same one generated by openssl, sha1sum, or any compliant library.
- Browser-native Web Crypto implementation — same output as openssl
- UTF-8 byte encoding for predictable non-ASCII handling
- Live update as you type
- Lowercase hex output, ready to paste into git or a checksum file
Frequently Asked Questions
Is SHA-1 still safe to use?
For password storage or digital signatures: no. SHOWN collision attacks (Google's SHAttered, 2017) made it unsafe for security-critical use. It's still fine for non-adversarial integrity checks like git object IDs.
Why does git still use SHA-1?
Git uses SHA-1 for content addressing, not for security — collisions there cause file mix-ups, not security breaches. The git project is migrating to SHA-256, and recent versions accept either.
Can the same input ever produce a different hash?
No — SHA-1 is deterministic. The same input bytes always produce the same 160-bit digest. If you get different outputs from different tools for the "same" text, one is using a different character encoding (UTF-8 vs UTF-16, with or without BOM).
How is non-ASCII text encoded before hashing?
As UTF-8. The string is fed through TextEncoder before being passed to crypto.subtle.digest, so "café" is hashed as the 5 bytes 63 61 66 c3 a9, not as 4 UTF-16 code units.
Explore the full suite of Hash & Crypto tools and 290+ other free utilities at Chunky Munster.