RFC 4231 fixture
Use message Hi There, a hexadecimal key containing 0b repeated 20 times, and SHA-256. The full tag is b0344c61d8db38535ca8afceaf0bf12b881dc200c9833da726e9376c2e32cff7.
Check an HMAC integration using the exact message bytes, shared-key bytes, and hash algorithm expected by your protocol. Explicit encodings help catch the common mistake of treating a hex-encoded key as ordinary text.
An encoded key is decoded before use. For example, hex 616263 means the three bytes “abc”, not the six text characters “616263”.
Message, key, and tag remain in this page’s memory. This tool never writes them to a URL, browser storage, or a server. Copy and download export only the tag. Limits: 250,000 UTF-16 code units per input and 64 KiB decoded key. An empty key is unsupported. No trimming, normalization, or newline is added. Web Crypto requires HTTPS; the key is imported as nonextractable.
HMAC authenticates bytes using a shared secret; it does not encrypt the message. This visual comparison is for troubleshooting and is not a server-side constant-time verifier.
Conversions run locally in your browser. This tool does not upload input or save it to browser storage.
Enter a message and select its encoding. An empty message is valid.
Enter a nonempty single-line key and explicitly choose UTF-8, hex, Base64, or Base64url key encoding.
Choose the HMAC hash and generate the full authentication tag.
Select an output representation, compare an optional full hex tag, or copy/download the tag. Clear the fields when finished.
Use message Hi There, a hexadecimal key containing 0b repeated 20 times, and SHA-256. The full tag is b0344c61d8db38535ca8afceaf0bf12b881dc200c9833da726e9376c2e32cff7.
Hex 616263 becomes the same three key bytes as UTF-8 abc. UTF-8 616263 is six different bytes and therefore produces a different tag.
HMAC combines a secret key, the message bytes, and a selected hash function. Different whitespace, serialization, Unicode normalization, or line endings can change the message bytes. This tool adds no newline, trims no text, and performs no normalization.
An HMAC tag helps parties that share a secret authenticate a message. It does not conceal the message and does not prove which holder of the shared key created it. Use the exact hash, output alphabet, and any truncation rules required by your protocol; this tool always generates the full tag.
The key is imported into Web Crypto as nonextractable. Input values remain in page memory; the tool does not write them to URLs or browser storage. Copy and download export only the selected tag. A visual equality check is useful for debugging, but is not a replacement for constant-time verification in a server implementation.
Yes. Choose that key encoding explicitly. Correct omitted padding is accepted; incorrect alphabets, padding, or unused bits are rejected.
No. A zero-byte message has a valid HMAC under a nonempty key. Blank keys are unsupported by the browser Web Crypto import used here.
Some existing HMAC protocols specify it. The option is labeled legacy; choose SHA-256 or stronger for a new integration unless your protocol defines another choice.