LocalToolkit
HomeHash & Checksum › SHA-1 Hash Generator

SHA-1 Hash Generator

Get the 40-character SHA-1 digest for any string, without an upload.

🔒 Runs in your browser. Nothing is uploaded — verify it in the network panel, or disconnect and try again.

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

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

  1. Paste your input.
  2. Algorithm selector stays on SHA-1.
  3. 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.

Frequently asked questions

Is SHA-1 still usable?
For integrity against accidental damage, yes. For anything a hostile party can influence, no — collisions are practical and cheap enough to matter.
Why does git still use SHA-1?
Compatibility and inertia. Git added collision detection after SHAttered and now supports SHA-256 repositories, but migrating every existing object ID is a long project. Practical git attacks require a chosen-prefix collision and defeating the detection.
Is SHA-1 better than MD5?
Marginally harder to break, and it fell later, but both are collision-broken and neither is acceptable for new signature work. Treat them as equally obsolete for adversarial use.
How long is a SHA-1 hash?
160 bits, which is 20 bytes or 40 hexadecimal characters.
Related tools
MD5 Hash GeneratorSHA-256 Hash GeneratorSHA-512 Hash GeneratorHash Algorithm ComparisonHMAC GeneratorFile Checksum Verifier
Keep reading
How browser-only processing worksAll Hash & Checksum toolsEvery tool on the site