Omnikit
DevFilesMoneyAll tools
Ctrl K
Dev toolsFile toolsMoney calculatorsAll tools
HomeDeveloper toolsHMAC GeneratorHMAC-SHA256 Generator

HMAC-SHA256 Generator

dev

Compute an HMAC-SHA256 signature in hex and Base64

Runs in your browser. Nothing you type is sent anywhere. Updated on 24 Oct 2026.

HMAC-SHA256 is the signature most APIs ask for: AWS request signing, Razorpay and Stripe webhooks, JWTs signed with HS256 and countless internal services. Type or paste the secret and the message and the 64-character hex digest appears as you type, with the Base64 form beside it. Keys can be plain text, hex or Base64, and the whole calculation runs in your browser.

Next:
  • Hash Generator MD5, SHA-1, SHA-256, SHA-384 and SHA-512 of text or files, with checksum compare
  • JWT Decoder, Verifier & Encoder Decode any JWT, verify its signature, and sign new tokens, all in your browser

How to generate an HMAC-SHA256 hash online

1

The page opens with SHA-256 already selected under Algorithm.

2

Type the shared secret into Secret key, and set Text, Hex or Base64 to match how your API gives it.

3

Paste the exact string or request body to sign into Message; a line break at the end changes the result.

4

Copy the 64-character Hex digest, or the Base64 form if the API header expects that.

How HMAC-SHA256 Generator works

This HMAC generator computes a keyed hash of text or a file with SHA-1, SHA-256, SHA-384 or SHA-512 and shows the result in hex, Base64 and URL-safe Base64 as you type. It also verifies: paste the signature you expect and it tells you whether it matches.

HMAC is how two systems prove a message came from someone holding a shared secret and was not changed on the way. Developers reach for it when a payment provider's webhook fails verification and they need to know whether the secret, the body or the header is wrong, when writing a signing function and checking it against a known answer, or when an API document shows an example signature to reproduce.

The key can be typed as text, hex or Base64, because providers publish secrets in all three. The expected signature can be hex or Base64 and may keep its header prefix, such as sha256= from GitHub or the t=,v1= format from Stripe. Comparison runs in constant time, the way your server should do it too.

The rest of the article, and all 6 questions about HMAC Generator, are on the HMAC Generator page.

Frequently asked questions

How do I generate an HMAC SHA256 signature online?

Choose SHA-256, type or paste the secret key, then type the message or pick a file. The signature appears immediately in hex and Base64; press Copy next to the one your API expects. If your key is given as hex or Base64 rather than text, switch the key format first, because the same characters decode to different bytes.

Why does my webhook signature not match?

Usually the body is not byte-for-byte what the sender signed: a framework parsed and re-serialised the JSON, changed line endings or trimmed whitespace. Sign the raw body. Other causes are using the wrong secret (test and live keys differ), treating a hex secret as text, or comparing hex against a Base64 signature.

What is the difference between HMAC and a plain SHA-256 hash?

A plain hash can be computed by anyone, so it proves nothing about who made it. HMAC mixes in a secret key, so only someone with the key can produce the right value. It is also built to resist length-extension attacks that break the naive approach of hashing the key followed by the message.

What are the limits?

Text messages of any practical length and files up to 200 MB, because Web Crypto needs the whole message in memory. SHA-1, SHA-256, SHA-384 and SHA-512 are supported; MD5 is not available in Web Crypto and should not be used for new signatures anyway. Keys must be at least one byte.

Still stuck? Ask about HMAC Generator and anybody who knows can answer. No account needed.

More ways to use HMAC Generator

  • HMAC GeneratorHMAC-SHA1, SHA-256, SHA-384 and SHA-512 of text or a file, and signature checks
  • Webhook Signature VerifierCheck that a webhook body matches the signature header its sender attached

Same job, other tools: Bcrypt Generator – Generate a bcrypt hash for a test user or a config file · OTP Generator – Time-based one-time passwords with 6 or 8 digits and a choice of algorithm.

On the related tools: JWT Decoder – Paste a token to read its header, payload and expiry.

Related tools

All developer tools
Link Safety CheckerPaste a suspicious link and see the phishing tricks in it, without ever opening the linkWebRTC Leak TestSee which IP addresses WebRTC hands to websites, and whether your VPN is being bypassedBrowser and Device InfoSee what any website can read about your browser and device, and copy it for supportJWT Decoder, Verifier & EncoderDecode any JWT, verify its signature, and sign new tokens, all in your browserPassword GeneratorStrong random passwords and memorable passphrases, generated on your devicePassword Strength CheckerHow long your password would survive an attack, and exactly what makes it weakBcrypt Hash and VerifyHash a password with bcrypt at cost 4 to 14, or check a password against a hashTOTP Generator and TesterLive authenticator codes from a secret, a QR code for your app, and a code tester

In the collection Security Tools for Developers.

Was this tool helpful?
Omnikit

Small jobs, done in your browser. Free, fast and private. Files are never uploaded.

Files

  • Compress Image
  • Image to PDF
  • Merge PDF
  • Compress PDF
  • PDF to Word
  • Word to PDF

Dev

  • JSON Formatter & Validator
  • Base64 Encode & Decode
  • JWT Decoder, Verifier & Encoder
  • Password Generator
  • UUID Generator
  • Unix Timestamp Converter

Money

  • SIP Calculator
  • EMI Calculator
  • GST Calculator
  • FD Calculator
  • PPF Calculator
  • Lumpsum Calculator
GuidesQuestionsAboutHow we checkLaw library (beta)PrivacyTermsDisclosureContactMore: Exam practice (UGC NET Paper 1)Runs in your browser. Nothing is uploaded. © 2026 Omnikit (theomnikit.com)