HMAC Generator

Generate Hash-based Message Authentication Codes

0 characters

Use a strong, random secret key for security.

Enter a message and secret key to generate HMAC

About HMAC

HMAC (Hash-based Message Authentication Code) combines a cryptographic hash function with a secret key to provide both data integrity and authenticity.

Common Uses:

  • API request signing
  • JWT signature verification
  • Webhook payload validation
  • Password hashing (with salt as key)

Security Note

All processing happens locally in your browser. Your secret key is never sent to any server.

Algorithm Comparison

AlgorithmOutput SizeSecurityUse Case
HMAC-SHA1160 bitsLegacyBackward compatibility
HMAC-SHA256256 bitsStrongGeneral purpose, JWT HS256
HMAC-SHA384384 bitsStrongHigh security applications
HMAC-SHA512512 bitsStrongestMaximum security needs

What is HMAC?

HMAC (Hash-based Message Authentication Code) combines a hash function with a secret key to provide both integrity verification and authentication. Unlike plain hashes, HMAC requires a key, making it ideal for API signing and webhook verification.

Frequently Asked Questions

How is HMAC different from a hash?

HMAC uses a secret key, so only someone with the key can generate or verify it.

Which algorithm should I use?

SHA-256 is the most common. Use SHA-512 for higher security requirements.

Is HMAC encryption?

No. It provides authentication and integrity but does not encrypt the message.