Skip to content

Security

HMAC Generator

Generate and verify keyed message authentication codes with SHA-256, SHA-384 and SHA-512.

Loading tool…

Find this tool in

About this tool

What is HMAC Generator?

Reproduce a keyed message-authentication calculation when inspecting a webhook or checking two implementations. The secret, message encoding, algorithm and output encoding must all match. A tiny difference in serialized bytes, including a newline, changes the result. Use demonstration keys for shared examples and keep actual signing material out of copied reports.

A worked example

Check a known HMAC-SHA-256 calculation

Example input

key: key
message: The quick brown fox jumps over the lazy dog

Expected result

f7bc83f430538424b13298e6aa6fb143ef4d59a14946175997479dbc2d1a3cd8

Select SHA-256, interpret both inputs as UTF-8 text and display HEX output. The deliberately weak word key is only a reproducible test input. For an actual webhook, use the provider's exact message-byte definition and signing procedure. Hashing a parsed and reserialized body can differ from authenticating the original request bytes.

Common mistakes and limits

  • HMAC authenticates under a shared secret; it does not encrypt the message. Anyone who knows the secret can produce a matching code.
  • A match in this browser is a diagnostic result. Production verification also needs correct key management, comparison behavior and any required replay protection.

Features

What you can do

  • Generate HMAC signatures with SHA-256, SHA-384 and SHA-512.
  • Use text, hexadecimal or Base64 messages.
  • Use text, hexadecimal or Base64 secret keys.
  • Generate hexadecimal output.
  • Generate Base64 and Base64URL output.
  • Verify an expected signature against the generated HMAC.
  • Normalize signature formats before comparison.
  • Detect malformed hexadecimal input.
  • Detect invalid Base64 input.
  • Load webhook and hexadecimal examples.
  • Copy each generated signature.
  • Process messages and secrets locally through the Web Crypto API.

Frequently asked questions

Questions about HMAC Generator

What is an HMAC?

An HMAC is a keyed message authentication code that combines a cryptographic hash function with a shared secret to authenticate message integrity and origin.

What is the difference between a hash and an HMAC?

A regular hash only uses the message. An HMAC also requires a secret key, which allows trusted parties to verify who generated the signature.

Which algorithms are supported?

The tool supports HMAC using SHA-256, SHA-384 and SHA-512.

Can I verify webhook signatures?

Yes. Enter the exact webhook payload and shared secret, then compare the generated signature with the value supplied by the webhook provider.

What is Base64URL?

Base64URL is a URL-safe Base64 variant that replaces plus and slash characters and usually removes trailing padding.

Are secret keys uploaded?

No. Messages, secrets and signatures remain inside your browser and are processed through the Web Crypto API.

Related tools