Key encoding controls how bytes are interpreted (max 65,536 characters).
Message limit: 262,144 characters. UTF-8 uses exact bytes, including spaces and line endings. Hex/Base64 modes decode input bytes before signing.
Key encoding controls how bytes are interpreted (max 65,536 characters).
Message limit: 262,144 characters. UTF-8 uses exact bytes, including spaces and line endings. Hex/Base64 modes decode input bytes before signing.
Message authentication code; not plain SHA-256, encryption or password hashing.
Keyed message authentication guide
An HMAC uses a secret key and a message to compute a deterministic message authentication code. This tool signs bytes using your browser's Web Crypto API without making a server request. Enter a key, select byte encodings and generate a signature you can copy. This tool is free to use. No account or payment is required.
Last updated
HMAC-SHA256 incorporates a secret key, while ordinary SHA-256 computes a digest without any key. For API and webhook signatures, the exact message bytes, key encoding and output encoding must all match the other system.
HMAC authenticates a message when the shared key remains secret. It does not encrypt or hide the message, and it is not a password-hashing algorithm.
UTF-8 signs the text you enter, including trailing spaces and newlines. Hex decodes each pair of digits to one byte; Base64 decodes a canonical padded Base64 string. Changing an encoding mode changes the signed bytes.
A zero-length message produces a valid HMAC, but this tool rejects empty keys. Output can be copied as lowercase hexadecimal or standard Base64.
Your key and message are held in the current browser component only and are not written into URLs, browser storage, logs, analytics events or network requests by this tool. The secret key field is hidden by default.
Web Crypto requires a compatible secure browser context such as HTTPS. Avoid entering real production credentials on shared devices and clear the fields when finished.
A published standard test vector; Jefe is a test key, not a real credential.
Jefe | what do ya want for nothing?5bdcc146bf60754e6a042426089575c75a003f089d2739839dec58b964ec3843Common questions
No. Web Crypto signs locally, and tool analytics receives only non-sensitive event metadata, not your key, message or signature.
No. HMAC includes a secret key to authenticate the message. A plain SHA-256 digest does not use a key.
Yes, with a non-empty key. Empty payloads have valid HMAC signatures.
Yes. Choose Hex or standard Base64 input mode to decode bytes before signing. UTF-8 mode signs entered text as UTF-8 bytes.
No. Use a password-specific hashing scheme such as Argon2, scrypt or bcrypt. HMAC is designed for keyed message authentication.
Debugging a specific Hash issue? Browse Hash troubleshooting.