— HMAC Generator

Free HMAC Generator (Message Authentication)

Quick Tips

  • This tool runs entirely in your browser - your data stays private.
  • Press Ctrl+V (Cmd+V on Mac) to quickly paste text.
  • Use the Copy button to save your result to clipboard.
  • Bookmark this page for quick access!

Generate HMAC (Hash-based Message Authentication Code) with various algorithms.

Algorithm:

Your Recent Tools

Examples

Input
message=hello&timestamp=123
Output
9c5c0c20cc5e80e4adb8e2e81ec04c2e30c47b8461e9c0f3e8ee0a2f20fd0b37
Input
{"event":"payment"}
Output
4d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e

Why Use This Tool?

What problems does this solve?

Plain hashes cannot prove who created them. HMAC adds authentication - verifying that a message came from someone who knows the secret key. This is essential for secure API authentication and webhook verification.

Common use cases:

  • Generating API request signatures for authentication
  • Verifying webhook signatures from payment processors
  • Creating secure session tokens and cookies
  • Implementing JWT signature verification
  • Building secure inter-service communication

Who benefits from this tool?

Backend developers implementing API authentication. Security engineers designing secure protocols. DevOps teams verifying webhook integrations. Anyone working with HMAC-based authentication systems.

Privacy first: All HMAC computation happens locally in your browser. Your secret keys and data never leave your device.

Frequently Asked Questions

A hash provides data integrity - detecting changes. HMAC provides integrity plus authentication - proving the message came from someone with the secret key. Without the key, valid HMACs cannot be forged.

HMAC-SHA256 is the standard recommendation for new applications. HMAC-SHA512 for extra security margin. Avoid HMAC-MD5/SHA1 for new systems unless required for legacy compatibility.

Keys should be at least as long as the hash output (32 bytes for HMAC-SHA256, 64 bytes for HMAC-SHA512). Longer keys do not add security. Use cryptographically random bytes, not passwords.

Passwords make weak HMAC keys due to low entropy. Use cryptographically random bytes instead. If you must derive a key from a password, use a proper key derivation function like PBKDF2 or HKDF.

APIs use HMAC to authenticate requests. The client signs request data with their secret key. The server verifies the signature, confirming the request came from a legitimate client with the correct key.

HMAC provides additional security beyond the underlying hash, making HMAC-MD5 and HMAC-SHA1 more secure than raw MD5/SHA-1. However, use HMAC-SHA256 for new systems to avoid any questions about algorithm strength.