Generate HMAC signatures using SHA-256, SHA-384, and SHA-512. Output in hex or base64 encoding. Verify HMAC values against expected signatures. All processing happens client-side using the Web Crypto API.
Enter a message and secret key above to generate HMAC...
Uses the browser's native crypto.subtle API for secure, hardware-accelerated HMAC computation. No third-party libraries required.
HMAC is computed instantly as you type. No need to click a button -- results update in real time with every keystroke.
Paste an expected HMAC to instantly verify it against the computed value. Perfect for debugging webhook signatures and API authentication.
Output in hexadecimal or base64 encoding. Support for text (UTF-8) or hex-encoded secret keys to match any API requirement.
HMAC is a specific type of message authentication code (MAC) that uses a cryptographic hash function combined with a secret key. Defined in RFC 2104, HMAC provides both data integrity and authentication. Unlike a plain hash, an HMAC proves that the message was created or approved by someone who possesses the secret key.
The HMAC algorithm processes the key through two rounds of hashing with inner and outer padding (ipad and opad). The formula is: HMAC(K, m) = H((K' XOR opad) || H((K' XOR ipad) || m)). This construction makes HMAC resistant to length extension attacks that affect naive key+message hashing approaches.
A plain hash (like SHA-256) only verifies data integrity -- the data has not changed. An HMAC also verifies authenticity -- the data was signed by someone with the secret key. Additionally, HMAC is resistant to length extension attacks, which affect plain hashes of algorithms like SHA-256 when used as hash(secret + message).
Generate hashes, decode tokens, and verify data integrity with our free developer tools. No sign-up required.