SHA-1 Hash Generator

Get the SHA-1 hash of text or a file, and check it against an expected one.

Options
SHA-1 hash

Examples

Questions

Is SHA-1 safe to use?

Not for security. In 2017 researchers made two different PDFs with the same SHA-1 hash, and browsers no longer trust SHA-1 certificates. It's still fine for checksums where nobody is trying to fake a match.

Why does Git still use SHA-1?

Most repositories were created with SHA-1 object IDs, and moving a project's whole history to a new hash is disruptive. Git's IDs guard against accidental damage more than attacks. New repositories can choose SHA-256.

What should I use instead of SHA-1?

SHA-256 or SHA-512. Neither has a known practical attack. Both are available as tools on this site.

Why doesn't my hash match another tool?

This tool hashes your text as UTF-8, like sha1sum. A trailing newline or a different text encoding gives a different hash.

What is the SHA-1 hash of an empty string?

da39a3ee5e6b4b0d3255bfef95601890afd80709. It's also the hash of an empty file.