Skip to main content
← Home

SHA-1 Hash Generator

Calculate the SHA-1 hash of any text

What is SHA-1?

A SHA-1 hash is 160 bits, shown as 40 hexadecimal characters. Since the 2017 SHAttered collision it is retired for certificates and signatures, but it still appears in older protocols and in Git object IDs. Use it for compatibility and SHA-256 for anything new.

Examples

SHA-1 of “hello”
aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d
SHA-1 of an empty string
da39a3ee5e6b4b0d3255bfef95601890afd80709

Frequently asked questions

Is SHA-1 still secure?

No. Practical collision attacks exist, so SHA-1 must not be used for signatures or certificates. It is acceptable only for non-adversarial checksums and for compatibility.

How long is a SHA-1 hash?

160 bits, shown as 40 hexadecimal characters.

How do I check a file's SHA-1 in a terminal?

Linux: sha1sum file.zip. macOS: shasum file.zip. Windows: certutil -hashfile file.zip SHA1.

Related tools