SHA-1 Hash Generator
SHA-1 produces a 160-bit (40 hex character) digest, historically used for git object IDs and file checksums. Like MD5, it is now considered cryptographically broken and must not be relied on for security. Git still uses SHA-1 for commit and object IDs mostly for historical and compatibility reasons, with mitigations added after a practical collision attack was demonstrated in 2017 — for any new project needing a security-relevant hash, SHA-256 or better is the modern recommendation instead.
How it works
- Type or paste text.
- Read the SHA-1 digest, updated as you type.
- Copy the result with the Copy result button.
Formula Web Crypto SubtleCrypto.digest("SHA-1", data) → lowercase hex
Frequently asked questions
Is SHA-1 secure?
No. Practical collision attacks against SHA-1 have been publicly demonstrated since 2017. Do not use it where security matters.
Why does git still use SHA-1 for commit IDs?
Historical reasons — git treats it primarily as a content identifier, not a security boundary, and newer git supports SHA-256 repositories.
How is this different from the SHA-256 hash generator?
Same idea, shorter and weaker digest (160 bits vs. 256). Prefer SHA-256 for anything that isn’t matching a specific legacy SHA-1 value.
Is this computed with a real cryptographic library?
Yes — via the browser’s native Web Crypto API, not a hand-rolled implementation (unlike this site’s MD5 tool, which Web Crypto doesn’t support).
Is my text uploaded anywhere?
No. Hashing runs entirely in your browser.