Free Online HMAC Generator
Generate HMAC-SHA256 and HMAC-SHA512 hash-based message authentication codes from text and a secret key. All processing runs locally in your browser.
Key Features
Cryptographically Secure
Uses the native Web Crypto API with cryptographically secure HMAC signing — no external libraries required.
Two Algorithms
Choose between HMAC-SHA256 and HMAC-SHA512 to match your API or application requirements.
Hex & Base64
Output HMAC in either hex or Base64 encoding — both commonly used in API authentication headers.
100% Private
Your secret key and message never leave your browser. All computation runs entirely client-side.
Understanding HMAC
HMAC uses a cryptographic hash function and secret key to provide data integrity and authenticity verification. The dual-hash approach prevents length extension attacks. Used for JWT signature verification and API authentication.
Frequently Asked Questions
What is HMAC and how does it differ from a regular hash?
How do I use this HMAC generator?
- Enter your secret key in the Secret Key field.
- Type or paste the message you want to sign.
- Select the algorithm (SHA-256 or SHA-512) and output format (Hex or Base64).
- Click Generate HMAC to compute the result.
- Use the Copy button to copy the HMAC value to your clipboard.
Example
Secret Key:
my-secret-key
Message:
Hello, World!
HMAC-SHA256 (Hex):
5ccec1ce96ea3b58b1d6c6ffd2ac1b8c0ea74fab8d5fb27f133cbe34a4d8b821