HomeToolsSecurity ToolsHMAC

HMAC Generator & Verifier

Security Tools
Verified
★ Popular

Generate and verify Hash-based Message Authentication Codes using various algorithms for secure authentication and data integrity verification

Related in Security Tools:JWTPasswordHash Generator

HMAC Generator & Verifier

Generate and verify Hash-based Message Authentication Codes for data integrity and authentication

Generate HMAC
Create a cryptographic hash using your message and secret key
HMAC Information

What is HMAC?

HMAC (Hash-based Message Authentication Code) is a cryptographic authentication technique that combines a secret key with a message and a hash function to create a unique signature.

It provides both data integrity and authentication, ensuring that the message hasn't been tampered with and comes from someone who knows the secret key.

Common Use Cases

• API request authentication
• Digital signatures
• Message integrity verification
• Webhook payload validation
• Secure token generation
• Password-based authentication

Algorithm Comparison

SHA-1: 160 bits (deprecated, use only for legacy support)
SHA-256: 256 bits (recommended for most use cases)
SHA-384: 384 bits (good for high security needs)
SHA-512: 512 bits (maximum security, slower)

Security Best Practices

• Use SHA-256 or higher for new implementations
• Keep secret keys secure and rotate regularly
• Use sufficiently long random secret keys
• Always validate HMAC on the receiving end
• Never log or expose secret keys
• Use constant-time comparison when verifying