Using the wrong canonical string
Webhook providers specify an exact string-to-sign. Passing the raw body may not match.
Fix: Follow the provider's signing scheme precisely — see Stripe, GitHub, Slack docs.
header • up to 320x100 / 728x90
Generate an HMAC-SHA256 code for signing JWTs, webhook payloads, API requests, and OAuth tokens.
Output will appear here...
content bottom • up to 300x250
sidebar • 160x600
Last reviewed:
HMAC (Hash-based Message Authentication Code) combines a cryptographic hash with a secret key to verify both the integrity and authenticity of a message.
HMAC-SHA256 Generator computes an RFC 2104 HMAC using the SHA-256 hash function and a shared secret, returning a 64-character hex digest.
HMAC-SHA256 is the workhorse of modern API signing: JWTs with HS256, Stripe, GitHub, Slack, and AWS SigV4 webhooks all depend on it, so being able to reproduce a signature quickly saves a lot of time in debugging.
message: api-request-body key: sha256-api-key
e1c92d13d9de3b6b8b1d63bff2dda61e2f6ab6b48dde0a8842c8a7ec03cdb1ef
Webhook providers specify an exact string-to-sign. Passing the raw body may not match.
Fix: Follow the provider's signing scheme precisely — see Stripe, GitHub, Slack docs.
Hex vs. base64 vs. base64url output can all represent the same HMAC differently.
Fix: Match the format your peer expects before comparing.
Copy-pasting often adds a trailing newline, changing the signature.
Fix: Trim trailing whitespace, or ensure both sides include it consistently.
Yes. It is the de-facto standard for API request signing and considered safe for modern use.
256 bits (64 hex characters).
Yes. JWT HS256 signs the header.body string with HMAC-SHA256 and base64url-encodes the signature.
Yes. `crypto.createHmac('sha256', key).update(msg).digest('hex')` returns the same output.
No. The tool runs entirely in your browser.
This field takes UTF-8 text. Convert binary data to base64 first if needed.
Extend the HMAC-SHA256 workflow with JWT tools, webhook verifiers, and adjacent HMAC variants. You can also browse the full Cryptography & Hashing category for more options.
Decode and view JWT token payloads
Generate HMAC authentication codes
Generate SHA-256 cryptographic hash
Generate an HMAC-SHA1 code to sign webhook payloads, AWS-style requests, or legacy API authentication schemes.
Generate an HMAC-SHA384 code for enterprise-grade message authentication and PCI-friendly signatures.
Generate an HMAC-SHA512 code for high-entropy signatures on large payloads and long-lived tokens.
Generate an HMAC-MD5 message authentication code from a plaintext message and shared secret key.
Generate a keyed SHA-224 HMAC fingerprint for compact message authentication in embedded and IoT systems.
Generate an HMAC-SHA3 keyed-hash authentication code using the Keccak family for modern cryptographic workflows.
Encrypt plaintext with AES and a passphrase, or decrypt CryptoJS-formatted ciphertext back to readable text, entirely in your browser.
Generate CRC-16 checksum
Generate CRC-32 checksum