Online HMAC Generator — SHA-2, SHA-3, BLAKE2, Streebog & SM3

Generate Hash-based Message Authentication Codes (HMAC) in your browser. Supports JWT standards (HS256/HS512), AWS SigV4, GOST R 34.11-2012 Streebog, Chinese SM3, BLAKE2, and SHA-3. Zero server transmission.

The key is handled as UTF-8 text. We recommend using a cryptographically strong secret of at least the hash block length.

HMAC-SHA-256 —
HMAC-SHA-512 —
HMAC-SHA-384 —
HMAC-SHA-224 —
HMAC-SHA3-256 —
HMAC-SHA3-512 —
HMAC-SHA3-384 —
HMAC-SHA3-224 —
HMAC-BLAKE2b-512 —
HMAC-BLAKE2b-256 —
HMAC-BLAKE2s-256 —
HMAC-MD5 —
HMAC-SHA-1 —
HMAC-RIPEMD-160 —
HMAC-Streebog-256 —
HMAC-Streebog-512 —
HMAC-SM3 —
HMAC-Whirlpool —

Understanding HMAC (RFC 2104)

HMAC (Keyed-Hash Message Authentication Code) is a specific type of message authentication code involving a cryptographic hash function in combination with a secret key. It guarantees both data integrity and authenticity: an attacker without the secret key cannot forge a valid tag.

HMAC(K, m) = H( (K ⊕ opad) ‖ H( (K ⊕ ipad) ‖ m ) )

SHA-2 Family (Industry Standard)

HMAC-SHA-256

256 bits

The primary authentication standard: underlying JWT (HS256), AWS Signature V4, Telegram initData, and Stripe / GitHub webhooks.

HMAC-SHA-512

512 bits

High-security 512-bit MAC. Best suited for high-value financial APIs, JWT HS512, and post-quantum security requirements.

HMAC-SHA-384

384 bits

Truncated intermediate SHA-2 digest mandated by US Federal Suite B and TLS 1.3 cipher suites.

HMAC-SHA-224

224 bits

Compact 224-bit SHA-2 variant tailored for constrained communication channels and legacy interoperability.

SHA-3 Family (Sponge Construction)

HMAC-SHA3-256

256 bits

NIST Keccak standard featuring inherent resistance to length-extension attacks, ideal for cutting-edge smart contract architectures.

HMAC-SHA3-512

512 bits

512-bit maximum-security HMAC for long-term document and ledger verification.

HMAC-SHA3-384

384 bits

Intermediate 384-bit SHA-3 authentication tag aligned with AES-192 encryption suites.

HMAC-SHA3-224

224 bits

Compact 224-bit SHA-3 digest engineered to replace legacy 224-bit hashes.

BLAKE2 Family (High-Performance)

HMAC-BLAKE2b-512

512 bits

64-bit optimized BLAKE2b HMAC: faster than MD5 while matching the security level of SHA-3.

HMAC-BLAKE2b-256

256 bits

256-bit BLAKE2b: maximum throughput on modern 64-bit CPUs with a compact output length.

HMAC-BLAKE2s-256

256 bits

32-bit architecture variant optimized for microcontrollers, embedded IoT hardware, and WireGuard.

Legacy & RIPEMD

HMAC-MD5

128 bits

HMAC-MD5 (RFC 2104). While standalone MD5 is vulnerable to collision attacks, HMAC-MD5 remains theoretically secure but is discouraged for modern architectures.

HMAC-SHA-1

160 bits

HMAC-SHA-1 remains active in legacy systems: OAuth 1.0a, TOTP/HOTP 2FA tokens, and AWS SigV2.

HMAC-RIPEMD-160

160 bits

160-bit European cryptographic standard. Essential to Bitcoin address derivation (HASH160).

Specialized & National Standards

HMAC-Streebog-256 (GOST R 34.11-2012)

256 bits

HMAC based on Russian standard GOST R 34.11-2012 (Streebog 256-bit). Standardized for national digital signature verification.

HMAC-Streebog-512 (GOST R 34.11-2012)

512 bits

512-bit GOST R 34.11-2012 Streebog MAC for high-compliance government cryptographic data integrity.

HMAC-SM3 (GB/T 32918)

256 bits

Chinese cryptographic standard GB/T 32918. Mandatory for commercial cryptography and banking in China.

HMAC-Whirlpool

512 bits

512-bit MAC built on the W block cipher (modified AES MDS matrix) by Vincent Rijmen and Paulo Barreto.

Frequently Asked Questions

What is HMAC and why is it needed?

HMAC verifies that a received message is authentic and has not been altered in transit. Unlike a raw hash, computing an HMAC requires a shared secret key.

What is the difference between SHA-256 and HMAC-SHA256?

SHA-256 is an unkeyed hash that anyone can compute for any text. HMAC-SHA256 uses nested hashing with inner (ipad) and outer (opad) key paddings, making it mathematically impossible to forge without knowing the secret key.

Which HMAC algorithm should I choose for a new system?

HMAC-SHA-256 is the standard choice for modern software (JWT HS256, API webhooks). For higher security requirements, choose HMAC-SHA-512 or HMAC-SHA3-256. Use HMAC-SHA-1 or HMAC-MD5 only when required for backward compatibility.

How long should the secret key be?

The secret key should be at least as long as the output size of the chosen hash function. For HMAC-SHA256, use at least 32 cryptographically random bytes (256 bits). Keys longer than the hash block size are pre-hashed automatically.

Does HMAC prevent Length Extension attacks?

Yes. Naive construction H(key || message) is vulnerable to length extension attacks in Merkle-Damgård hashes. HMAC's double-hash formula H(K ⊕ opad || H(K ⊕ ipad || message)) completely neutralizes this vector.

Where is HMAC used in modern protocols?

JSON Web Tokens (JWT HS256/HS384/HS512), AWS Signature V4, Stripe and GitHub webhook signatures, TOTP/HOTP 2-factor authentication, IPsec, and TLS 1.3 PRF.

What is HMAC-Streebog (GOST)?

An authentication code built on top of the Russian national cryptographic hash standard GOST R 34.11-2012 (Streebog). Widely required in government IT systems across Russia and the EAEU.

Where is the Chinese HMAC-SM3 standard used?

SM3 is the official national standard of China (GB/T 32918), mandatory for commercial cryptography, UnionPay financial transactions, and compliance in China.

Are my secret keys or messages transmitted to a server?

No. All computations are executed 100% locally in your browser using JavaScript and WebAssembly. No sensitive credentials or payloads ever leave your device.

Related Tools

All operations run locally in your browser.