StringMash.com

SHA-256 generator

The SHA-256 hash of your text, computed on your device.

3 characters
Updates as you type

Show the steps
  1. SHA-256 of 3 bytes of UTF-8: 256 bits, written as 64 hex digits. The same input always gives the same hash, and any change gives a completely different one.
  2. SHA-256 is a current, secure general-purpose hash.
  3. Hashing is one-way: there is no key, and the input can't be worked back out from the hash. For passwords, use a slow, salted function such as bcrypt, scrypt or Argon2 rather than any of these.

Using the generator

Type or paste text and the SHA-256 hash appears, 64 hex digits. The text is hashed as UTF-8, which is what nearly every other tool and library does, so the result matches theirs. Algorithm switches to MD5, SHA-1, SHA-384 or SHA-512, and Letters gives capitals if you need them.

Hashing runs in your browser through the Web Crypto API. Nothing you type is sent anywhere.

Worked examples

abc is the example in NIST's Secure Hash Standard documents.
TextSHA-256
abcba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
abda52d159f262b2c6ddb724a61840befc36eb30c88877a4030b65cbe86298449c9
The quick brown fox jumps over the lazy dogd7a8fbb307d7809469ca9abcb0082e4f8d5651e46d3cdb762d02d0bf37c9e592
(empty)e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855

How SHA-256 works

SHA-256 pads the message to a multiple of 512 bits, ending with its length, and processes it one 512-bit block at a time. Each block goes through 64 rounds that mix it into a state of eight 32-bit words. The starting state comes from the square roots of the first eight primes, and each round adds a constant from the cube roots of the first 64 primes, numbers anyone can recompute, so nobody could have slipped a hidden weakness into them.

Change abc to abd, one letter apart, and the two hashes above share nothing you could predict. That spread is what lets a hash stand in for a whole file.

Checking a download

Software sites often publish a SHA-256 next to the file. Hash what you downloaded and compare: if every digit matches, the file is the one they published. Do it on the file itself: shasum -a 256 file.iso on macOS, sha256sum file.iso on Linux, or Get-FileHash file.iso in Windows PowerShell, which uses SHA-256 unless told otherwise. This page hashes text, not files.

What SHA-256 is for

SHA-256 turns any input into a 256-bit fingerprint. The same input always gives the same hash, a one-letter change gives a completely different one, and there's no known way to find two inputs with the same hash. That makes it right for checking a download, naming content, and signing. It isn't right for storing passwords on its own: see hashing vs encryption.

Questions

Can a SHA-256 hash be reversed?

No. It's one-way. A short or common input can be guessed and checked, but the hash itself gives nothing back.

Why doesn't my hash match another tool's?

Usually a hidden difference in the input: a trailing newline, a space, or a different text encoding. This page hashes exactly what's in the box as UTF-8.

What's the SHA-256 of an empty string?

e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.

Sources

Added . Last updated and reviewed . What's new