SHA-1 Hash Generator
Get the 40-character SHA-1 digest for any string, without an upload.
SHA-1 in one line
SHA-1 compresses any input into 160 bits, printed as 40 hex characters. abc gives a9993e364706816aba3e25717850c26c9cd0d89d, and the pangram gives 2fd4e1c67a2d28fced849ee1bb76e7391b93eb12.
The 2017 collision that ended its career
On 23 February 2017 the CWI Amsterdam and Google Research collaboration published SHAttered: two distinct PDF files with the same SHA-1 digest. The attack cost roughly 6,500 CPU-years plus 110 GPU-years of computation — expensive, but 100,000 times cheaper than a brute-force birthday attack. NIST had already disallowed SHA-1 for digital signatures in 2013, and browsers stopped accepting SHA-1 certificates in the same window.
Where SHA-1 quietly persists
- Git object IDs — every commit you have ever made is named by SHA-1. Git's collision detection blocks the known attacks, and the project ships SHA-256 repositories as the long-term replacement.
- Legacy HMAC-SHA1 — still permitted in some telecom and OAuth 1.0 flows.
- Non-adversarial checksums — the same 'accidental corruption only' case as MD5.
Choosing between SHA-1 and SHA-256
If you control both ends of a system today, there is no reason to choose SHA-1: SHA-256 costs little more and has no known collision. If you are reading a value produced by a system you do not control — a git SHA, an old API signature — this page reproduces it exactly.
How to use it
- Paste your input.
- Algorithm selector stays on SHA-1.
- Copy the 40-character digest.
Worth knowing
- Digest length: 160 bits / 40 hex characters.
- Standardised as FIPS 180-1 (1995), superseded by FIPS 180-4.
- Chosen-prefix collisions published 2017 (SHAttered).
- Deprecated for digital signatures by NIST since 2013.
Limitations
- Do not use SHA-1 for signatures, certificates, or anything adversary-influenced.
- Git over SHA-1 is safe in practice because of added collision detection, not because SHA-1 is sound.
- SHA-1 is not a password hash.
- Output is lowercase hex here; some tools print uppercase.