SHA-1 Hash Generator

SHA-1 digests for legacy checksums and Git-style fingerprints, computed with the Web Crypto API.
Client-side · verifiable
How this tool works

SHA-1 gives a 160-bit digest, 40 hex characters. It replaced MD5 in the late 1990s and served as the backbone of TLS certificates, code signing and Git until the SHAttered attack of 2017 produced two PDFs with the same hash. Browsers stopped trusting SHA-1 certificates that year; Git has been migrating to SHA-256.

Where you still meet it:

  • Git commit and object ids (a collision needs a deliberate, expensive attack, so accidental risk is nil)
  • the Have I Been Pwned password corpus, which is indexed by SHA-1
  • HMAC-SHA1, which remains secure because HMAC does not depend on collision resistance, and is used by TOTP authenticator apps

This page uses crypto.subtle.digest("SHA-1") for text and a streaming WebAssembly hasher for files.

Security note

What leaves your browser

Text is hashed in memory with the Web Crypto API; files are read in chunks with the File API and hashed in WebAssembly. There is no upload endpoint on this page. Open DevTools → Network and hash something: no request appears.

FAQ
Is SHA-1 broken?

For collision resistance, yes: attackers can make two inputs with the same hash for around $10,000 of compute. Preimage resistance, reversing a given hash, is still intact.

Should I stop using SHA-1 everywhere?

For signatures and certificates, yes, long ago. For HMAC-SHA1 and Git ids it remains acceptable, though new systems should pick SHA-256.

Can a hash be decrypted?

No. Hashing is not encryption; there is no key and no inverse function. The only way to find an input is to guess candidates and compare hashes, which is exactly why password hashes must be slow.

Why does the same text give a different hash on another site?

Usually a trailing newline, different line endings, or a different text encoding. Hash the exact bytes and the results agree everywhere.