SHA1 Hash Generator
Calculate SHA-1 hashes instantly online. Supports UTF-8, UTF-16, Hex, and Base64 input encodings. Enable HMAC-SHA1 with a secret key for message authentication codes.
Share Link
Related Hash Tools
Frequently Asked Questions
What is SHA1?
SHA1 vs MD5 — which is better?
Is SHA1 still used in Git?
What is HMAC-SHA1?
About SHA1 Hash Generator
SHA-1 (Secure Hash Algorithm 1) was published by NIST in 1995 as Federal Information Processing Standard 180-1. It produces a 160-bit (20-byte) message digest by processing input in 512-bit blocks through 80 rounds of bitwise operations across four stages. For over a decade it was the most widely used cryptographic hash function in TLS certificates, code signing, and software distribution.
The SHAttered Collision
In February 2017, researchers at Google and CWI Amsterdam published "SHAttered" — the first practical SHA-1 collision. They produced two different PDF files with identical SHA-1 hashes, requiring approximately 9.2 × 10¹⁸ SHA-1 computations. This definitively ended SHA-1's use in X.509 certificates and code signing. All major browsers now reject SHA-1 TLS certificates.
SHA1 in Git
Git identifies every object (commit, tree, blob, tag) by its SHA-1 hash. Despite the SHAttered attack, Git's use is considered acceptable because generating a collision requires controlling the contents of both files — an attacker who can already write to your repository does not need a collision attack. Git is actively migrating to SHA-256 as a long-term solution.
HMAC-SHA1
HMAC-SHA1 remains secure for message authentication. OAuth 1.0, many TOTP (time-based one-time password) implementations, and various legacy APIs still use HMAC-SHA1. The HMAC construction's security does not require collision resistance — it relies on SHA-1 behaving as a pseudorandom function when keyed, a property that has not been broken.
When to Use SHA1 Today
Use SHA-1 only for legacy compatibility — matching checksums published before 2017, interoperating with systems that require it, or working with Git internals. For all new applications, SHA-256 (from the SHA-2 family) or SHA3-256 is the recommended choice.