Skip to content

HMAC-SHA256

Recommended

HMAC-SHA256 combines SHA-256 with a secret key to produce a keyed hash for message authentication. It verifies both data integrity and authenticity, widely used in APIs, JWTs, and secure communications.

What is HMAC-SHA256?

HMAC-SHA256 is a recommended cryptographic hash algorithm that produces a 256 bits (64 hex characters) output. HMAC-SHA256 combines SHA-256 with a secret key to produce a keyed hash for message authentication. It verifies both data integrity and authenticity, widely used in APIs, JWTs, and secure communications. It is classified as fast in performance and commonly used for api request authentication and signing (aws, stripe, etc.) and jwt (json web token) signing with hs256 algorithm.

Output Length

256 bits (64 hex characters)

Speed

Fast

Security

Recommended

Performance

Same speed as SHA-256 — fast enough for real-time message authentication and API request signing.

Use Cases

Example Hash

Input:

Hello, World! (with key: secret)

HMAC-SHA256 Output:

4822eb3a8339c3dab301166236d0a90b59d737d82b0890a92cf474ed5bb1e53c

Try HMAC-SHA256 Hash Generator

Generate HMAC-SHA256 hashes from text or files. WASM-powered, free, and 100% in your browser.

Open Hash Generator →

Related Algorithms

SHA-256 Recommended
256 bits (64 hex characters)
SHA-3-256 Recommended
256 bits (64 hex characters)
HMAC-SHA512 Recommended
512 bits (128 hex characters)

Related Reading

SHA-256 vs SHA-512 vs MD5: Hash Algorithm Comparison → How to Create a Strong Password in 2026 → What Is JWT and How It Works →