Generate a 160-bit SHA-1 hash from any text — instant, free, and computed locally in your browser.
What is SHA-1?
SHA-1 (Secure Hash Algorithm 1) was published by the NSA in 1995. It maps any input to a 160-bit
digest — 40 hexadecimal characters — and for two decades it was the world's default hash for
certificates, signatures and software fingerprints.
Example: the SHA-1 hash of hello is aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d —
the tool above is pre-filled so you can see it live.
Is SHA-1 secure?
No. In 2017 researchers demonstrated the first practical SHA-1 collision — the SHAttered attack,
two different PDF files with the same SHA-1 hash. Browsers and certificate authorities have since
rejected SHA-1 certificates, and NIST has deprecated it for digital signatures. Do not use SHA-1
anywhere collision resistance matters.
Common uses of SHA-1
- Git object IDs: every commit, tree and blob in a classic Git repository is named by its SHA-1 hash (Git is migrating to SHA-256).
- Legacy signatures and certificates: SHA-1 still appears in old documents, timestamping services and archived software.
- Non-security checksums: like MD5, acceptable for spotting accidental corruption.
For new designs choose SHA-256 or stronger.
Other hash generators
Need a different digest? Pick another algorithm — each has its own page:
Or go back to the Hash Generator homepage to see all five hashes at once.
Why does my hash not match another tool?
Hashes are computed over bytes, not characters, so two inputs that look identical can still produce different digests. The three usual causes:
- A trailing newline. The shell command
echo "secret" hashes "secret" plus a line break, while printf %s "secret" (or echo -n) hashes just the word. Text copied out of a terminal often carries that invisible newline.
- Character encoding. This tool encodes your input as UTF-8 before hashing. "café" is 5 bytes in UTF-8 but 4 bytes in Latin-1, so a tool using a different encoding returns a different digest for the same word. Make sure both sides use UTF-8.
- Stray whitespace. Leading or trailing spaces from copy-paste change the input — and therefore the hash. This tool hashes exactly what sits in the box, byte for byte.
Digest sizes at a glance
Every algorithm has a fixed output length, so a quick character count tells you whether a pasted hash is complete or truncated:
| Algorithm | Bits | Hex characters |
| MD5 | 128 | 32 |
| SHA-1 | 160 | 40 |
| SHA-256 | 256 | 64 |
| SHA-384 | 384 | 96 |
| SHA-512 | 512 | 128 |
Letter case is only display formatting: toggling Uppercase hex does not change the underlying value, and two digests that differ only by case are the same hash.
Frequently asked questions
Is SHA-1 broken?
Yes. The SHAttered attack (2017) produced the first practical collision, and later chosen-prefix attacks made it cheaper still. SHA-1 is deprecated for signatures and certificates; major browsers have rejected SHA-1 certificates since 2017.
How many characters is a SHA-1 hash?
A SHA-1 hash is always 40 hexadecimal characters, representing 160 bits, regardless of the input size.
Why does Git still use SHA-1?
Git chose SHA-1 in 2005 to name objects, long before practical collisions existed. Because Git hashes content with a header, attacking a repository is harder than the raw SHAttered attack suggests, but the project is nonetheless transitioning to SHA-256.