HMAC Generator — Free Online HMAC Authentication Code Generator
Generate HMAC signatures with SHA-256, SHA-512, or SHA-1 — keyed message authentication code for API security.
Jump to tool ↓Frequently Asked Questions
HMAC: Message Authentication with Cryptographic Keys
HMAC (Hash-based Message Authentication Code) solves a fundamental security problem: proving that a message came from someone who knows a shared secret. Unlike regular hashes which are public and deterministic, HMAC output depends on a secret key — without the key, an attacker cannot forge a valid HMAC for any message.
HMAC is foundational to API authentication. AWS Signature Version 4 uses HMAC-SHA256 to sign requests. JWT HS256 tokens use HMAC-SHA256 to sign the header and payload. GitHub, Stripe, and Shopify use HMAC-SHA256 to sign webhook payloads, allowing receiver verification. When you see a signature header like X-Hub-Signature-256: sha256=abc123..., that's HMAC-SHA256.
This tool uses the Web Crypto API (crypto.subtle.importKey +crypto.subtle.sign) for native HMAC computation. Select the algorithm, enter your message and secret key, then click Generate.
Standards & References
Built and maintained by DevDecode. This tool processes your input in your browser; it is not uploaded for processing. Found an issue? Let us know.
Related Tools
Related Guides
What Is a Hash Function? A Plain-English Guide with Examples
Understand cryptographic hash functions with verified SHA-256 examples, collision and preimage resistance, and the difference between hashes and authentication.
HashingWhat Is Hashing in Cybersecurity?
See how cryptographic hashes support password storage, integrity checks, and signatures, and why a hash alone does not prove who supplied a file.
SecurityWhat Is HMAC? How It Works and When to Use It
HMAC (Hash-based Message Authentication Code) proves both data integrity and authenticity. Learn how HMAC works, how it differs from plain hashing, and how to implement it for webhooks and APIs.