Hmac generator
Computes a hash-based message authentication code (HMAC) using a secret key and your favorite hashing function.
Plain text to compute the hash
Secret key
Hashing function
Output encoding
HMAC of your text
Usage Guide & Notes
- Enter your message text in the plain text area
- Provide a strong secret key
- Select your hashing algorithm (SHA256 is recommended for most uses)
- Choose your preferred output encoding format
- The HMAC will be generated automatically
- Use the copy button to copy the result to your clipboard
HMAC (Hash-based Message Authentication Code) is a mechanism for calculating a message authentication code using a cryptographic hash function combined with a secret key. It simultaneously verifies both data integrity and authenticity.
HMAC security depends on:
- The cryptographic strength of the underlying hash function
- The length and entropy (randomness) of the secret key
- The proper implementation of the HMAC algorithm
Unlike standard hashing, HMAC requires a shared secret key between the sender and receiver.
- Use a strong, random secret key with at least 32 bytes of entropy
- While an empty key is allowed, it significantly reduces security - only use for testing
- Choose SHA256 or stronger algorithms for security-sensitive applications
- Avoid MD5 and SHA1 for new security implementations (they're cryptographically weak)
- All computation happens locally in your browser - no data is transmitted
- Keep your secret key secure - anyone with the key can generate or validate HMACs
- For web APIs, consider adding timestamp and nonce values to prevent replay attacks
- API Authentication: Verifying that API requests are authentic and unaltered
- Message Integrity: Ensuring data hasn't been tampered with during transmission
- Webhook Verification: Validating that webhook payloads come from trusted sources
- Cookie/Token Security: Adding tamper-proof signatures to session tokens
- File Integrity: Verifying downloaded files haven't been modified
- Challenge-Response Systems: Creating one-time authentication challenges
- HMAC vs Plain Hashing: HMAC adds a secret key, providing authentication in addition to integrity
- HMAC vs Digital Signatures: HMAC uses symmetric keys (faster but requires secure key exchange), while digital signatures use asymmetric keys (slower but easier key distribution)
- HMAC vs Encryption: HMAC verifies authenticity and integrity but doesn't hide the original message
Related Tools You Might Like

BIP39 Generator
Generate secure BIP39 mnemonic phrases for cryptocurrency wallets. Create passphrases with different entropy levels and in multiple languages.

Bcrypt
Bcrypt is a tool for encrypting and decrypting text using the Bcrypt algorithm.

Encryption Decrypt
Encrypt and decrypt text using different algorithms like AES, TripleDES, Rabbit, or RC4. This tool processes all data locally for maximum security.

Hash Text
Hash a text string using various hash functions: MD5, SHA1, SHA256, SHA224, SHA512, SHA384, SHA3 or RIPEMD160.

CyberChef
CyberChef is a free, open-source, web-based tool for encryption, decoding, compression, and data analysis. It features a wide range of operations for handling various data formats, including Base64, Hex, and more.

Shrug Emoji Generator
Generate shrug emoji ¯_(ツ)_/¯ in different fonts and styles.