Webhook HMAC-SHA256 demonstration

See how a shared secret and a message produce a 32-byte authentication code. Generate the same digest in hex and Base64, entirely in your browser. Free, no login.

Use synthetic data only. Inputs stay in this page’s memory; they are not stored, added to URLs, logged or sent over the network. The secret stays masked.

Try a synthetic message

Maximum: 1,024 UTF-8 bytes for the secret; 65,536 for the message.

A reproducible example

The public RFC 4231 test case 2 uses the synthetic secret Jefe (4 bytes) and the message what do ya want for nothing? (28 bytes), without quotes or a final newline.

Expected HMAC-SHA256 in hex:

5bdcc146bf60754e6a042426089575c75a003f089d2739839dec58b964ec3843

Expected Base64:

W9zBRr9gdU5qBCQmCJV1x1oAPwidJzmDnexYuWTsOEM=

HMAC authenticates bytes with a shared key. It is not encryption, a plain SHA-256 hash or proof of a sender’s identity without securely shared keys.

Exact bytes matter

Both fields are encoded as UTF-8 with TextEncoder. Spaces, tabs and newlines count. The tool does not trim text, parse JSON, decode keys or normalize Unicode. For example, é is 2 bytes and 🔐 is 4; visually equivalent Unicode sequences can produce different digests.

The message box uses LF newlines. It cannot reproduce arbitrary binary payloads or preserve pasted CRLF bytes. Incomplete Unicode characters are rejected. An empty message is valid; this demonstration requires a non-empty secret.

Web Crypto needs HTTPS or localhost and a supported browser. No fallback sends your inputs to a server.

Real webhook verification belongs on your server

This page generates a learning example. It does not contact a provider, send a webhook or verify a real signature. Follow your provider’s contract for the raw request bytes, key encoding, signed timestamps, header format and digest encoding. Verify with a server-side cryptographic API, enforce replay protection where required, and reject invalid requests before processing them. Never publish a production secret or place verification keys in frontend code.