SHA-1 hash generator
Compute the SHA-1 hash of text or a file. SHA-1 has known collisions.
Runs in your browser. Your input is not uploaded.
SHA-1 has practical collisions. Use SHA-256 for anything new.
SHA-1
What it does
SHA-1 produces a 160-bit digest (40 hex characters). Git used it for object IDs and many older checksums use it.
SHA-1 is broken for collision resistance: researchers produced two different PDFs with the same SHA-1 in 2017. Use SHA-256 for anything new.
How to use it
- Type text or choose a file.
- Choose hex or Base64.
- Compare with a known checksum if you have one.
Example
Input
abc
Output
a9993e364706816aba3e25717850c26c9cd0d89d
Things to watch for
- SHA-1 is unsuitable for signatures and certificates. Browsers rejected SHA-1 certificates in 2017.
- HMAC-SHA1 is still considered safe, because HMAC does not rely on collision resistance. Use the HMAC tool for that.
Questions
- How do I check a file’s SHA-1 checksum?
- Choose the file, paste the published checksum into Compare, and the tool says whether they match. On the command line:
sha1sum file. - Is the file uploaded?
- No. It is read and hashed in your browser. Files up to 512 MB are supported.
- Why is my hash different from another tool’s?
- Usually a trailing new line (
echoadds one; useprintf %s), a different character encoding, or Windows line endings. This tool hashes the exact UTF-8 bytes of the text. - Can a hash be reversed?
- No. But short or common inputs can be found by guessing, which is why plain hashes are not suitable for passwords.