SHA2 256 bits (a.k.a SHA256) Hash Calculator
Calculate the SHA2 256 bits (a.k.a SHA256) Hash from UTF-8 Text
Simply use the form below
SHA-2 (Secure Hash Algorithm 2) is a set of cryptographic hash functions designed by the United States National Security Agency (NSA). Cryptographic hash functions are mathematical operations run on digital data; by comparing the computed "hash" (the output from execution of the algorithm) to a known and expected hash value, a person can determine the data's integrity. For example, computing the hash of a downloaded file and comparing the result to a previously published hash result can show whether the download has been modified or tampered with. A key aspect of cryptographic hash functions is their collision resistance: nobody should be able to find two different input values that result in the same hash output.
SHA-2 includes significant changes from its predecessor, SHA-1. The SHA-2 family consists of six hash functions with digests (hash values) that are 224, 256, 384 or 512 bits: SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224, SHA-512/256.
SHA-256 and SHA-512 are novel hash functions computed with 32-bit and 64-bit words, respectively. They use different shift amounts and additive constants, but their structures are otherwise virtually identical, differing only in the number of rounds. SHA-224 and SHA-384 are simply truncated versions of the first two, computed with different initial values. SHA-512/224 and SHA-512/256 are also truncated versions of SHA-512, but the initial values are generated using the method described in Federal Information Processing Standards (FIPS) PUB 180-4. SHA-2 was published in 2001 by the National Institute of Standards and Technology (NIST) a U.S. federal standard (FIPS). The SHA-2 family of algorithms are patented in US patent 6829355. The United States has released the patent under a royalty-free license.
In 2005, an algorithm emerged for finding SHA-1 collisions in about 2,000 times fewer steps than was previously thought possible. In 2017, an example of a SHA-1 collision was published. The security margin left by SHA-1 is weaker than intended, and its use is therefore no longer recommended for applications that depend on collision resistance, such as digital signatures. Although SHA-2 bears some similarity to the SHA-1 algorithm, these attacks have not been successfully extended to SHA-2.
Comparison of SHA functionsIn the table below, internal state means the "internal hash sum" after each compression of a data block.
Note that performance will vary not only between algorithms, but also with the specific implementation and hardware used. The OpenSSL tool has a built-in "speed" command that benchmarks the various algorithms on the user's system.
Algorithm and variant | Output size (bits) |
Internal state size (bits) |
Block size (bits) |
Max message size (bits) |
Rounds | Operations | Security bits (Info) |
Example performance (MiB/s) |
First Published | |
---|---|---|---|---|---|---|---|---|---|---|
MD5 (as reference) | 128 | 128 (4 × 32) |
512 | Unlimited | 64 | And, Xor, Rot, Add (mod 232), Or | <64 (collisions found) |
335 | 1992 | |
SHA-0 | 160 | 160 (5 × 32) |
512 | 264 − 1 | 80 | And, Xor, Rot, Add (mod 232), Or | <80 (collisions found) |
- | 1993 | |
SHA-1 | 160 | 160 (5 × 32) |
512 | 264 − 1 | 80 | <63 (collision found) |
192 | 1995 | ||
SHA-2 | SHA-224 SHA-256 |
224 256 |
256 (8 × 32) |
512 | 264 − 1 | 64 | And, Xor, Rot, Add (mod 232), Or, Shr | 112 128 |
139 | 2001 |
SHA-384 SHA-512 SHA-512/224 SHA-512/256 |
384 512 224 256 |
512 (8 × 64) |
1024 | 2128 − 1 | 80 | And, Xor, Rot, Add (mod 264), Or, Shr | 192 256 112 128 |
154 | 2001 | |
SHA-3 | SHA3-224 SHA3-256 SHA3-384 SHA3-512 |
224 256 384 512 |
1600 (5 × 5 × 64) |
1152 1088 832 576 |
Unlimited | 24 | And, Xor, Rot, Not | 112 128 192 256 |
- | 2015 |
SHAKE128 SHAKE256 |
d (arbitrary) d (arbitrary) |
1344 1088 |
min(d/2, 128) min(d/2, 256) |
- | 2015 |