- Home
- Tools
- Developer Tools
- Hash Generator
- SHA-1 Hash Generator
SHA-1 Hash Generator
Get the SHA-1 of a text or a file in your browser and check it against the value you were given. With a tab for HMAC-SHA-1.
0 bytes as UTF-8
Result
SHA-1
–
SHA-1 in short
SHA-1 produces 160 bits, written as 40 hexadecimal characters. It was designed by the NSA, became a US federal standard in 1995 and gradually took over from MD5.
| Length | 160 bits (20 bytes) |
|---|---|
| Written as hex | 40 characters |
| Written as Base64 | 28 characters |
| Of nothing at all (the empty text) | da39a3ee5e6b4b0d3255bfef95601890afd80709 |
| Of the word hello | aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d |
Broken for security since 2017
In February 2017 researchers at Google and CWI Amsterdam published two different PDF files with the same SHA-1. From then on a matching SHA-1 no longer proves that two files are the same when someone may have crafted them. Browsers stopped accepting certificates signed with SHA-1 in the same year.
Against accidental damage it works as well as it always did. Comparing a download with a listed SHA-1 is fine when all you want to know is whether it arrived intact.
Where you still meet it
- Git names every commit and file by its SHA-1. It has since added a check for the known attack, and a SHA-256 format as an option.
- Older APIs sign their requests with HMAC-SHA-1, and so do the six-digit codes of most authenticator apps. Used with a secret key like that, SHA-1 is not affected by the collision attack. The HMAC tab above gives you that value.
For anything new, choose SHA-256. For passwords, use bcrypt, scrypt or Argon2 and never a plain hash.
The hash generator shows MD5, SHA-1, SHA-256, SHA-384, SHA-512 and CRC-32 of the same input next to each other.