HMAC Generator

Generate HMAC hashes — SHA-256, SHA-512 with Web Crypto

🔒 Files never leave your browser
0 chars
HMAC Hash SHA-256

How to Use HMAC Generator

Enter message

Type or paste the message to hash.

Enter key

Provide the secret key.

Choose algorithm

Select SHA-1, SHA-256, SHA-384, or SHA-512 and see the HMAC.

Why Choose AllTools HMAC Generator?

  • 100% free, no account needed
  • SHA-1, SHA-256, SHA-384, SHA-512
  • Web Crypto API
  • Hex output
  • Uppercase/lowercase toggle
  • No data stored or transmitted

Why Use This Tool

  • No data leaves your browser — safe for proprietary code and sensitive data
  • Instant processing with zero server latency
  • No account or API key required
  • Works offline after initial page load
  • Supports latest syntax standards and specifications

Understanding HMAC Authentication

HMAC (Hash-based Message Authentication Code) combines a cryptographic hash function with a secret key to produce a message authentication code. Unlike a simple hash which anyone can compute from the same input, an HMAC requires knowledge of the secret key — only parties that share the secret can produce and verify the correct HMAC for a given message. This makes HMAC ideal for verifying both data integrity (the message hasn't been tampered with) and authenticity (the message came from someone who knows the secret). The HMAC algorithm works by combining the key with the message in a specific way before hashing, using two rounds of hashing with inner and outer padding derived from the key. Common HMAC variants include HMAC-SHA256 (most widely used), HMAC-SHA512 (higher security margin), and HMAC-MD5 (legacy, not recommended). The AllTools HMAC Generator computes HMACs using the Web Crypto API's SubtleCrypto.sign() method — the same cryptographic implementation browsers use for HTTPS and other security features. Your messages and secret keys are processed entirely in the browser — critical since these are by definition sensitive security values.

HMAC in API Authentication and Webhooks

HMAC authentication is used throughout modern API and webhook security. Webhook verification is the most common application — services like Stripe, GitHub, Shopify, and Twilio sign webhook payloads with HMAC-SHA256 using a shared secret. The receiving server computes the HMAC of the received payload using the same secret and compares it to the signature in the request header, verifying that the webhook genuinely came from the expected service and hasn't been tampered with. API request signing uses HMAC to authenticate API calls — AWS Signature Version 4 uses HMAC-SHA256 to sign every API request, proving the caller's identity without sending the secret key over the network. OAuth 1.0 uses HMAC-SHA1 for request signing. Message queuing systems use HMAC to verify message authenticity between producers and consumers. The AllTools HMAC Generator helps developers debug authentication issues — generate the expected HMAC for a test payload, compare it to what your code produces, and identify discrepancies in key encoding, payload formatting, or algorithm selection. Common HMAC debugging issues include: hex vs Base64 encoding of the key, trailing newlines in the payload, and incorrect character encoding of non-ASCII content.

Related Resources

Frequently Asked Questions

What is HMAC?
Hash-based Message Authentication Code — verifies data integrity and authenticity using a secret key.
Is this private?
Yes. All hashing happens in your browser.
Is there a file size limit?
No strict limit. Processing happens in your browser, so capacity depends on your device memory. Most files work smoothly.
Which browsers are supported?
All modern browsers including Chrome, Firefox, Safari, Edge, and Opera on both desktop and mobile.
Can I use this offline?
Yes. Once the page is loaded, the tool works without an internet connection since all processing is local.
Is my data secure?
Yes. Your data never leaves your browser. Nothing is stored on or transmitted to any server.

Related Tools

Dev

Hash Generator MD5/SHA

Generate and compare MD5, SHA-1, SHA-256, SHA-512 hashes instantly

Security

AES Encrypt/Decrypt

Encrypt and decrypt text with AES-GCM — password-based

Dev

JWT Generator

Generate JWT tokens — HMAC-SHA256 with color-coded parts

Dev

JWT Decoder

Decode JWT tokens to inspect header, payload, and expiration status

Dev

Base64 Encoder/Decoder

Encode and decode Base64 for text, files, and images — instant and private

Security

Password Generator

Generate passwords, passphrases, and PINs — custom