Skip to content
Sealpaste

Delete all recent work?

This removes the 0 items saved in this browser. Your settings stay.

Stop saving recent work?

New work won't be saved in this browser. The 0 items already saved can stay or go.

HMAC Generator

Text
The key stays in this tab. Text hashed with a key is not kept in recent work.

Type or paste text, or

HMACUTF-8
Ready
Runs in your browser. Nothing you paste is uploaded unless you share it.

Compute HMAC-SHA256, HMAC-SHA512, HMAC-SHA1 or HMAC-MD5 of a message with a secret key, to test webhook and API signatures

Sign a message with a secret key using HMAC-SHA256 and friends, to debug webhook signatures and signed API requests.

How to use it

  1. Paste the exact message (for webhooks: the raw request body, byte for byte).
  2. Enter the secret key.
  3. Paste the signature you received under the list to check it, in hex or Base64.

Examples

HMAC-SHA256

Input
Message: The quick brown fox jumps over the lazy dog
Key: key
Result
f7bc83f430538424b13298e6aa6fb143ef4d59a14946175997479dbc2d1a3cd8

RFC 4231 test case 2 (HMAC-SHA256)

Input
Message: what do ya want for nothing?
Key: Jefe
Result
5bdcc146bf60754e6a042426089575c75a003f089d2739839dec58b964ec3843

The standard’s own test vector: any HMAC-SHA256 that gives a different result is broken.

Why webhook signatures don’t match

When your computed HMAC differs from the provider’s, it is almost always one of these:

  • The body was parsed and re-serialized. Sign the raw bytes exactly as received.
  • Wrong encoding: some providers send hex, others Base64, sometimes with a prefix like "sha256=". The compare field leaves a prefix like that out and reads both encodings.
  • The signed string includes more than the body, e.g. a timestamp: "t=…" + "." + body.
  • A test secret is used against live events, or the reverse.

What GitHub, Stripe, Slack and Shopify sign

Each one signs with HMAC-SHA256 and its own secret, but over a different string and in a different header. Build the message exactly as the row says, paste it with the secret above, and compare with the header’s value.

ProviderHeaderMessage signedOutput
GitHubX-Hub-Signature-256: sha256=…the raw bodyhex
StripeStripe-Signature: t=…,v1=…t value + "." + raw bodyhex (v1)
SlackX-Slack-Signature: v0=…"v0:" + X-Slack-Request-Timestamp + ":" + raw bodyhex
ShopifyX-Shopify-Hmac-Sha256the raw bodyBase64

Sources: GitHub: validating webhook deliveries, Stripe: verify signatures manually, Slack: verifying requests, Shopify: verify webhooks, RFC 4231: HMAC-SHA test vectors

Questions

Is my text or file uploaded?
No. Everything runs in your browser, so your data stays on your device. Nothing you paste is uploaded unless you share it. SHA-1 and SHA-2 come from your browser’s Web Crypto API, the others from open-source code loaded with the page (the SHA-3, BLAKE and RIPEMD families from the audited @noble/hashes), which matters when you hash passwords or keys.
Is the key stored?
No. The key stays in this tab, and text hashed with a key is not kept in recent work. HMAC-SHA uses your browser’s Web Crypto API; HMAC-MD5 is worked out by the page.
Why doesn’t my HMAC match the webhook’s signature?
Almost always one of four things: the body was parsed and written out again instead of signed as the raw bytes received; the encoding differs (hex or Base64, sometimes with a prefix such as sha256=); the signed text holds more than the body, as Stripe’s timestamp, a dot and the body; or a test secret meets live events.

Related tools