← Blog dev

The same secret key can produce a different HMAC on different tools, and it's rarely a bug in your code. It's key encoding, and most tools never let you choose.

Scan to open this page

The same secret key can produce a different HMAC on different tools, and it's rarely a bug in your code. It's key encoding, and most tools never let you choose.

Before building our HMAC generator, we checked a popular tool directly and looked into a specific, well-documented source of confusing HMAC mismatches.

Live, without a Generate click

We checked codebeautify.org's HMAC generator directly: it requires clicking "Generate HMAC" for every change, and the page shows an "Ad blocking? It's okay" notice confirming ads sit near the tool. Ours updates the instant you type, with nothing competing for attention around it.

The real reason your HMAC doesn't match

A specific, common gotcha with these tools: some interpret your secret key as UTF-8 text, others as Hex- or Base64-encoded bytes — so the exact same-looking key string produces two different HMACs depending on which the tool silently assumed. Most generators don't give you a way to choose, and don't disclose which one they picked. Ours has an explicit key encoding selector — UTF-8 text, Hex, or Base64 — so you control exactly how your key is interpreted, and the result matches what you expect every time.

Nothing sent anywhere, and it says so

HMAC computation runs through the browser's own Web Crypto API. Your message and secret key never leave your browser — this page states that directly instead of leaving you to guess.

Try the HMAC generator →

#HmacGenerator#HmacGeneratorKeyEncodingHexBase64#HmacSha256OnlineClientSide#HmacGeneratorLiveNoButton