HMAC (Hash-based Message Authentication Code)
is a widely used mechanism for ensuring both data integrity and authenticity. It works by combining a secret key with a cryptographic hash function such as MD5, SHA-1, SHA-256, SHA-384, or SHA-512.
Use the free online tool below to quickly generate and verify secure HMAC signatures. It supports popular algorithms including
HMAC-SHA256,
SHA-384, and SHA-512, making it ideal for API authentication, secure message validation, and data integrity checks.
Generate HMAC
Verify HMAC i
Verification Warnings
If you need a modern and fast MAC algorithm, you should use: Poly1305
MAC Generator– High-performance MAC commonly used with ChaCha20.
When Should You NOT Use HMAC?
HMAC is not suitable for password storage or password hashing.
If you are storing user passwords or deriving encryption keys from passwords,
use a password hashing function instead:
Key:A secret key known only to the sender and the
receiver.
Hash Function:Typically, a cryptographic hash function
like SHA-256 or SHA-512.
Calculation
Initialization:Choose an appropriate hash function
(e.g., SHA-256) and a secret key K.
Key ModificationIf necessary, modify the key to fit the
hash function's block size.
PaddingIf needed, pad the key so it fits the block size
of the hash function.
asymmetric algorithms.
Usage Guide - HMAC-SHA256 Online Tool
First, enter the plain-text and the cryptographic key to generate the code. Then, you
can
use select the hash function you want to apply for hashing. The default is SHA-256.
Then
you can submit your request by clicking on the compute hash button to generate the
HMAC
authentication code for you.
By default, the output is in plain-text format, but you also have an option to get
the
output in Base64 format. Below is a screenshot of the usage:
This Verify HMAC tool lets you verify HMAC-SHA256 and HMAC-SHA512 signatures by
recalculating the MAC and securely comparing it with the provided value.
It is useful for testing API authentication, webhook signatures, and message
integrity.