HMAC Generator

Runs in browser

Generate and verify HMAC signatures. SHA-256, SHA-512, SHA-1, SHA-384.

Generate HMAC signatures with SHA-256, SHA-512, SHA-1, and SHA-384. Output as hex, Base64, or Base64url. Verify HMACs. Everything runs in your browser using the Web Crypto API.

HMAC Generator tool

Algorithm

Output Format

Result will appear here…

Verify HMAC

Paste an HMAC to compare against the generated result.

Computed in your browser using the Web Crypto API. The message and secret key never leave your device.

🔒 Runs in your browser · No uploads · Your data never leaves your device

How to use

  1. Enter message and secret key

    Paste the message and secret key. The HMAC is computed automatically as you type.

  2. Choose algorithm and format

    Select SHA-256, SHA-512, SHA-1, or SHA-384. Choose hex, Base64, or Base64url output.

  3. Verify an existing HMAC

    Paste an HMAC into the Verify section to check if it matches your message and key.

Common use cases

  • Verifying webhook signaturesCompute HMAC-SHA256 of a webhook payload using the provider's secret to confirm the signature in the X-Hub-Signature or Stripe-Signature header.
  • Generating API request signaturesSign API request bodies or query strings with a shared secret key to authenticate API calls to services that use HMAC-based auth.

Examples

  • Verify a webhook signature

    Compute HMAC-SHA256 of a Stripe-like payload.

    Input
    Message: payload body | Key: webhook_secret
    Output
    3ecb2b2c98f2...

Frequently asked questions

Is my secret key safe?
Yes. Everything runs in your browser. The secret key is never sent to any server.
What is the difference between hex and Base64 output?
Both encode the same HMAC bytes. Hex uses 0-9 and a-f characters (longer). Base64 is shorter and commonly used in HTTP headers. Base64url replaces + and / with - and _ for safe URL use.
Why is HMAC better than signing with a private key?
HMAC is faster and simpler for symmetric scenarios where both parties share the same secret. Use asymmetric signing (RSA, Ed25519) when the verifier must not know the signing key.

Key concepts

HMAC
Hash-based Message Authentication Code — a MAC computed using a cryptographic hash function and a secret key, proving both data integrity and authenticity.
Hex encoding
A way to represent binary data as a string of hexadecimal characters (0–9, a–f). HMAC output is typically expressed in hex or Base64.

You might find these useful too.

More hashing tools