HMAC Generator

Generate keyed HMAC codes from text or files. Choose SHA-256, SHA-512 or SHA-1, enter a UTF-8 or hex key, and troubleshoot API signature differences locally.

Calculate
0 characters
Result

Your result will appear here.

How to calculate an HMAC

  1. Choose the algorithm required by your integration and enter the message or select a file.
  2. Enter the key as UTF-8 text, or enable hexadecimal key mode for raw key bytes.
  3. Calculate and copy the hexadecimal result. For the example below, use hex key 0b repeated 20 times.

Working with HMAC Generator

HMAC combines a message with a secret key to calculate a message authentication code. Both parties must use the same bytes and algorithm. Keep the key secret, and distinguish hexadecimal key bytes from the text spelling of those bytes.

HMAC-SHA-256 example: RFC 4231 test vector

Input
Input Hi There Algorithm HMAC-SHA-256 Secret key (Key is hexadecimal) 0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b
Result
b0344c61d8db38535ca8afceaf0bf12b881dc200c9833da726e9376c2e32cff7

Questions about HMAC Generator

Is HMAC the same as SHA-256 or encryption?

No. HMAC uses a shared secret key to authenticate a message; plain SHA-256 has no key. Neither encrypts the message. Output is lowercase hex: 40 characters for SHA-1, 64 for SHA-256 and 128 for SHA-512.

When should I enable hexadecimal key mode?

When the key is represented as hex bytes. 6162 then means the bytes for ab, not the four text characters 6162. Enter complete byte pairs without spaces or a 0x prefix. Base64 keys must be decoded first.

Why does my API or webhook signature differ?

Match the exact message bytes, key and algorithm. Spaces, JSON formatting, line endings and UTF-8 BOM change the result. This calculator does not assemble provider-specific signing strings or convert the result to Base64.

Can I calculate HMAC for a file?

Yes. A selected file takes priority over text, and its original bytes are used. Limits are 8 MiB for text and 32 MiB per file. To reproduce RFC 4231, use message Hi There and hex key 0b repeated 20 times.

Are my files, tokens or text uploaded?

No. These tools process your input in your browser. The website serves the page and its code, but your input is not sent to a conversion server or saved in an account.

  • SHA-256 Hash & File Checksum

    Generate SHA-256 hashes for text or files and check a downloaded file against its published checksum.

  • SHA-512 Hash & File Checksum

    Calculate SHA-512 text and file hashes locally and compare full hexadecimal checksums.

  • JWT Decoder

    Read JWT headers and payloads, inspect expiry and activation times, and view claims without sending your token anywhere.

Explore all developer tools

Encoding & Files

Move between text, bytes, URLs and embedded images without changing your original data.

Data & Text Inspection

Read structured data, inspect tokens and understand exactly what changed.

Hashes, IDs & Schedules

Check file integrity, generate identifiers and make sense of times and recurring schedules.

Your input and files are processed on your device. Keep sensitive results out of shared clipboards and use a trusted device for private keys and tokens.