HMAC Generator
Generate an HMAC signature.
About this tool
Enter a secret key and a message and get the HMAC-SHA256 signature as 64 hex characters. Use it to test webhook signatures and signed API requests. Only SHA-256 is supported.
How to use
How it works
HMAC mixes a secret key into the hash so that only someone who knows the key can produce or verify the signature. The tool uses the Web Crypto API with SHA-256, reads both key and message as UTF-8 text and prints the result as lowercase hex.
Worked example
The standard test vector
- Input
- Key: key Message: The quick brown fox jumps over the lazy dog
- Output
- f7bc83f430538424b13298e6aa6fb143ef4d59a14946175997479dbc2d1a3cd8
- Walkthrough
- This is the HMAC-SHA256 example given in the HMAC Wikipedia article, which makes it a useful check that your own implementation matches.
Limitations
- Only HMAC-SHA256. SHA-1, SHA-512 and MD5 variants are not available.
- The key is treated as plain text, not as hex or Base64 bytes. Decode a Base64 secret first if your provider gives you one.
- Output is hex only, not Base64.
Questions
How do I generate an HMAC SHA256?
Does it support SHA-512 or SHA-1?
Is my secret key sent anywhere?
Why does my signature not match the provider's?
Features
- HMAC-SHA256
- Hex output
- Runs in your browser
Related resources
Guides and videos from around the web—opens on YouTube or the publisher’s site.
What Is A RESTful API?
Traversy Media
API context for JWT, JSON, and encoding utilities.
Watch on YouTubeLearn Regular Expressions - Crash Course
freeCodeCamp.org
Regex primer for tester and explainer pages.
Watch on YouTube
- Base64
MDN
When Base64 is appropriate versus raw binary transfer.
- Introduction to JSON Web Tokens
jwt.io
JWT structure for decoder and debugger pages.