RFC 4231 HMAC-SHA256 Test Vector
Input
what do ya want for nothing?JefeExample output
5bdcc146bf60754e6a042426089575c75a003f089d2739839dec58b964ec3843Compute keyed-hash message authentication codes (HMAC) using SHA-256, SHA-512, SHA-384, SHA-1, or MD5 entirely in your browser with custom UTF-8, hex, or base64 keys.
| Accepted input | Payload message and secret cryptographic key |
|---|---|
| Algorithms | HMAC-SHA256, HMAC-SHA512, HMAC-SHA384, HMAC-SHA1, and HMAC-MD5, or all five simultaneously |
| Key encodings | UTF-8 plain text, hexadecimal bytes, or Base64 encoded bytes |
| Output format | Hexadecimal (lowercase or uppercase) or Base64 string |
| Max message size | 6 MB |
| Execution deadline | 2 s |
| Processing location | Browser-only: keys and payloads never leave your machine |
Input
what do ya want for nothing?JefeExample output
5bdcc146bf60754e6a042426089575c75a003f089d2739839dec58b964ec3843HMAC calculation with an empty message or empty key is mathematically valid according to RFC 2104 and produces the exact standard digest.
If you select Hex or Base64 secret key encoding, the tool parses the raw decoded bytes before computing the HMAC digest.
HMAC-MD5 and HMAC-SHA1 trigger a DEPRECATED_ALGORITHM warning because MD5 and SHA-1 have known collision vulnerabilities.
Hash Generator
Generate cryptographic hashes and message digests including SHA-256, SHA-512, SHA-384, SHA-1, and MD5 for text payloads.
Checksum Calculator
Calculate non-cryptographic checksums and cyclic redundancy checks including CRC-32, CRC-32C, CRC-16, Adler-32, and BSD sum for data integrity verification.
JWT Decoder / Inspector
Decode and inspect JSON Web Token (JWT) headers, payloads, and claims locally in browser memory without signature verification.
Base64 Encoder / Decoder
Encode UTF-8 text to standard or URL-safe Base64 and decode Base64 back to text.
HMAC stands for Hash-based Message Authentication Code (RFC 2104). It combines a cryptographic hash function (like SHA-256) with a secret key to verify both data integrity and data authenticity, ensuring that a message has not been tampered with and comes from a trusted sender.
A regular hash (like SHA-256) only verifies data integrity and takes only an input message. An HMAC requires both a message and a secret key, proving that the creator of the hash knew the secret key.
Services like Stripe, GitHub, Shopify, and Slack calculate an HMAC signature of the HTTP request body using a shared secret and send it in a header (e.g. Stripe-Signature or X-Hub-Signature-256). The receiving server recomputes the HMAC and compares it to confirm the request is genuine.
According to RFC 2104, the key length should ideally match the output block size of the hash function (32 bytes / 256 bits for SHA-256). Keys longer than the block size are hashed first, and shorter keys are padded with zeros.