b2KIT

JWT Validator

Validate JWT signatures using HMAC secrets or RSA/EC public keys and check claim expiration and audience.

Tested tool guide Tested browser tools Checked August 16, 2026

What JWT Validator does and how it behaves

JWT Validator accepts a compact JWT plus verification material: a shared secret for an HMAC-signed token, or a public key for an RSA- or EC-signed token. It verifies whether the signature matches, then evaluates expiration and the intended audience. The common trap is treating a readable header and payload as proof of authenticity. A token can decode cleanly yet fail because its signature, key, secret, expiration, or audience does not match. It does not decrypt claims; signed JWTs are not necessarily encrypted. Browser-only processing keeps the token and sensitive verification material from being uploaded.

How the result is produced

1

Signature verification

A compact JWT normally has three base64url-encoded sections separated by periods. The signed content is the encoded header, a period, and the encoded payload. For HMAC, validation needs the identical shared secret used to create the signature. For RSA or EC, it needs the public key corresponding to the signing private key. Changing either signed section causes verification to fail. Each section uses base64url text without '=' padding.

2

Claim evaluation

After verifying the signature, the validator evaluates the claims it supports. An exp value is a NumericDate: a count of seconds from 1970-01-01T00:00:00Z, ignoring leap seconds. The token is expired once that time is reached. Audience checking compares the expected recipient with aud, which can be one case-sensitive string or an array of such strings. A signature can pass even when either claim check fails.

Good uses

  • Confirm that an API bearer token was signed with the expected HMAC secret before debugging an authorization failure.
  • Test an RSA- or EC-signed token against a service's public key while integrating an identity provider.
  • Determine whether a token is expired and whether its aud claim names the API that is about to receive it.

Limits and checks

  • A valid signature proves only that the supplied verification material matches the signed bytes. It does not prove that the issuer is trusted or that the subject is authorized. For HMAC tokens, any party holding the shared secret could have generated a matching signature.
  • Expiration is time-dependent. A token near exp can pass now and fail moments later; another verifier can also differ because its clock or permitted skew is different.
  • Audience values are identifiers, not fuzzy service names. A valid signature can accompany an aud value for another recipient, and an array is acceptable only when it contains the expected value exactly.

Common questions

Can I validate a JWT with only its header and payload?

No. Those sections can be decoded without a key, but cryptographic validation requires the token's signature and the matching shared secret or public key. If the header declares alg as "none", the object has no digital signature. It should not be treated as equivalent to a successfully verified signed token. Merely viewing decoded JSON establishes neither integrity nor origin.

Why does an audience check fail when the signature is valid?

They answer different questions. Signature verification checks whether the compact token matches the supplied key or secret. Audience validation checks whether aud identifies the recipient you expected. A token can therefore be authentic but intended for another API. Compare the complete identifier with correct case, including any scheme, path, or other characters that are part of it. Differences that change the string can matter.

References and verification

The behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools