SHA-256 Hash Generator

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

Options
SHA-256 hash

Examples

Questions

Is SHA-256 safe for storing passwords?

Not on its own. SHA-256 is fast, so an attacker with a leaked hash can try billions of guesses a second. Use a slow password hash like bcrypt, scrypt or Argon2.

Can a SHA-256 hash be turned back into the text?

No. A hash is one-way. The only way to find the input is to guess and check, which only works for short or predictable text.

Why does the hash change completely when I change one character?

This is called the avalanche effect. One changed character flips about half the output bits. It's what makes a hash good at spotting any change to a file or message.

Why doesn't my hash match another tool?

Check that both hash the same bytes. This tool hashes your text as UTF-8, like sha256sum and git. A trailing newline or a different text encoding gives a different hash.

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

e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855. Every empty file has this hash.