Message Authentication Code Generator

Generate a Message Authentication Code (MAC)

Need to use Message Authentication Code Generator right now?

HMAC is the standard way to compute a message authentication code — proving a message wasn't altered and came from someone who knows the shared secret.

No sign-upNo uploads 100% free

Features

  • Runs entirely in your browser
  • Privacy-first — your data is never uploaded
  • Real-time, instant results
  • 100% free, no sign-up required
  • Works on desktop, tablet, and mobile
  • No installation needed

Who uses this tool?

DevelopersIT adminsEveryday usersSecurity researchers

About Message Authentication Code Generator

HMAC (Hash-based Message Authentication Code) combines a secret key with a hash function to prove both that a message hasn't been altered and that it came from someone who knows the shared secret — a plain hash alone only proves integrity, not authenticity, since anyone could recompute a plain hash without knowing any secret.

This tool computes HMAC signatures using your browser's native Web Crypto API across SHA-1, SHA-256, SHA-384, and SHA-512, verified against the standard RFC 4231 test vectors for correctness. Enter a secret key and a message, and the signature updates automatically.

HMAC is the backbone of a huge amount of real infrastructure: webhook payload verification (confirming a webhook actually came from the service that claims to have sent it), API request signing, JWT signing (the 'HS256' algorithm is literally HMAC-SHA256), and OAuth 1.0a request signing — anywhere two parties share a secret and need to verify message authenticity without exchanging the secret itself.

This is useful for testing webhook signature verification during development, debugging API signing implementations by comparing computed signatures against expected values, understanding how JWT HS256 signatures are actually computed, and learning HMAC mechanics hands-on.

How it works

  1. Enter a secret key. The shared secret both parties would use to sign and verify.
  2. Choose a hash algorithm. SHA-1, SHA-256, SHA-384, or SHA-512.
  3. Enter the message. The HMAC signature computes automatically as you type.

Examples

Computing HMAC-SHA256 for a test message

Input

Secret: "secret", Message: "message"

Output

8b5f48702995c1598c573db1e21866a9b825d4a794d169d7060a03605796360

Frequently asked questions