Crypto Tools

SHA-256 Hash

Hash a string with SHA-256, with optional HMAC key authentication. Computed locally, nothing is uploaded.

HMAC is a message authentication code built on a hash function and a secret key. It verifies that data is intact and really comes from who it claims to. Published as RFC 2104 in 1997, it is used widely in IPSec, TLS/SSL and similar protocols.

Output format
About SHA-256

SHA-256 is a member of the SHA-2 family, designed by the U.S. National Security Agency (NSA) and published by NIST in 2001. It turns data of any length into a 256-bit (32-byte) digest, usually written as 64 hexadecimal characters.

SHA-256 is one of the most widely used hash algorithms today: TLS/SSL certificate signatures, Bitcoin’s proof of work, code signing, file integrity checks and more. Unlike SHA-1, no practical collision attack against SHA-256 is known, which makes it the recommended choice for production.

About HMAC

HMAC (Hash-based Message Authentication Code) adds a shared secret key on top of the hash function, so only parties holding the key can compute and verify the code. That is what keeps a message from being altered or forged along the way. HMAC-SHA256 is the usual pick for JWT, AWS Signature V4, WeChat Pay signatures and similar schemes.

The SHA family compared

The SHA family covers SHA-1 (160 bit, no longer recommended), SHA-224/256 (224/256 bit, known as SHA-2), SHA-384/512 (384/512 bit, also SHA-2) and the newer SHA-3 series. SHA-256 strikes a good balance between security and speed, which suits most production use.