About HMAC Calculator — Detailed Guide
A Hash-based Message Authentication Code (HMAC) combines a cryptographic hash function with a secret shared key to verify both data integrity and the authentic identity of the message sender. This tool calculates HMAC digests using the industry-standard HMAC-SHA256 and HMAC-SHA512 algorithms, which serve as the security foundation for REST API request signing, payment webhooks, and cloud authentication.
Simply provide your raw message string and the shared secret key to produce instant authentication digests formatted in either hexadecimal or Base64 encoding. Everything is computed locally inside your browser via the hardware-accelerated Web Crypto API, guaranteeing that your secret keys are never exposed to external networks.
Key Features & Capabilities
- Supports standard HMAC-SHA256 and HMAC-SHA512 implementations compliant with RFC 2104
- Instant live recalculation upon typing or pasting messages and secret credentials
- Flexible output display in both lowercase hexadecimal and Base64 format with one-click copy
- Client-side Web Crypto API execution keeping shared secrets and confidential payloads secure
How to Use
- 1
Paste the raw payload or canonical request string into the Message input field.
- 2
Enter your shared secret key into the Secret input field.
- 3
Select the target hashing algorithm (SHA-256 or SHA-512) and copy the computed signature output.
Common Use Cases
- → Validating incoming webhook signature headers from providers like GitHub, Stripe, or Shopify
- → Debugging custom API authentication signatures and anti-replay nonce/timestamp verification logic
- → Comparing backend cryptographic test vectors against standardized client-side HMAC outputs
Related Tools
Hash Calculator
Compute 22 cryptographic & checksum hashes (MD5, SHA-1, SHA-224/256/384/512, SHA-3, Keccak-256/512, SM3, BLAKE2b/2s, RIPEMD-160, CRC32, Adler-32, FNV-1a, MurmurHash3) for text and files.
AES Encrypt/Decrypt
Symmetric encryption and decryption using AES-GCM and AES-CBC with custom secret keys.
RSA Key Generator
Generate cryptographically secure RSA public/private key pairs and export in PEM format.
Bcrypt Hash
Generate secure Bcrypt password hashes and verify passwords against existing hashes.
SSH Key Generator
Generate Ed25519 and RSA SSH key pairs in your browser for secure server access.
JWT Generator
Create and sign JSON Web Tokens (JWT) with custom payloads, headers, and secret keys.
Frequently Asked Questions & Privacy
How does an HMAC differ from a regular cryptographic hash?
A regular hash only detects accidental data corruption because anyone can recalculate it. An HMAC incorporates a secret key known only to authorized parties, guaranteeing authenticity and preventing tampering.
Why does my calculated HMAC signature not match my backend API?
Mismatches are typically caused by subtle formatting differences in the canonical string: parameter ordering, URL-encoding discrepancies, invisible whitespace or newline differences (CRLF vs LF), or secret encoding mismatches.