HMAC Generator

Use the fields above to transform, validate, or format input. Errors appear in the on-page alert when parsing fails.

HMAC (SHA-256 / SHA-512)

How it works

The secret and message are UTF-8 encoded. Web Crypto computes HMAC-SHA-256 or HMAC-SHA-512 and returns a hexadecimal digest. Your secret never leaves the tab.

Quick tips

  • Regenerate a few times and keep sample outputs for comparison.
  • Copy output directly from this page to avoid retyping errors.
  • Use deterministic settings when you need reproducible results.

Use this tool for

  • Formatting or minifying snippets before pasting into a repo or ticket.
  • Checking encodings (Base64, hex, URL) without third-party paste services.
  • One-off developer checks during debugging.

Common questions

Does HMAC Generator cover every edge case for Hmac?

Verify units, bases, and pasted text (hidden spaces or wrong line endings); then spot-check one example by hand if the answer must be exact.

Can I use HMAC Generator offline?

Different rounding or parsing rules can shift edge-case output—sanity-check with a tiny hand example when precision matters.