DevNb

Encoding & Hashing/JWT Decoder

JWT Decoder & Verifier

Paste a JSON Web Token to see its header, payload and claims, check whether it has expired, and verify its signature. Everything runs in your browser and nothing leaves your device.

Decoding and signature verification happen locally. Your token, secret and keys never leave your browser.

Encoded token200 chars
  • Header
  • Payload
  • Signature
Header4 lines36 chars
Payload7 lines110 chars

Verify signature (HS256)

Enter the secret or public key to verify

🔒 Verified in your browser with the Web Crypto API. The key is never uploaded or saved to history.

A valid signature proves the token was signed with this key and not modified. It does not check exp, aud or iss: your server must validate those claims.

Header parameters

NameValueMeaning
algHS256HMAC using SHA-256.
typJWTMedia type of the token, normally JWT.

Payload claims

NameValueMeaning
subuser_123Subject: who the token is about (usually a user ID).
nameAda LovelaceFull name of the end-user.
roleadminCustom claim
iat1700000000Issued at: when the token was issued.
exp9999999999Expiration time: the token must not be accepted at or after this time.

Signature (Base64URL)

JsIbZDn4du5sbvvKeRJ1YRbFZt7a6WKnSA4X9g9e-8s

What is a JWT?

A JSON Web Token (JWT, pronounced “jot”) is a compact, URL-safe token format defined by RFC 7519. It consists of three Base64URL-encoded segments joined by dots: header.payload.signature.

The header describes the token type and signing algorithm (for example HS256 or RS256). The payload carries “claims”, statements about a user or session such as sub (subject), exp (expiry) and iat (issued at). The signature proves the token was not tampered with, but only when it is verified against the correct secret or public key.

How to decode and verify a token

Paste the token into the box. The header is shown in red, the payload in purple and the signature in cyan, and the decoded JSON and a table explaining each claim appear straight away. Timestamps such as exp, iat and nbf are converted to local time and UTC.

To verify the signature, enter the secret (HMAC algorithms) or the public key, certificate or JWK (RSA, ECDSA and EdDSA algorithms) in the verification box. The badge switches to “Signature verified” or “Invalid signature” as you type. Need a token to test with? Use the JWT Encoder below to create one.

FAQ

Is my token, secret or key sent to a server?

No. Decoding uses Base64URL and JSON.parse, and signature verification uses the Web Crypto API built into your browser. The token, secret and keys are never transmitted, and secrets and keys are never saved to your local history.

Can this tool verify a JWT signature?

Yes. Paste the HMAC secret for HS256, HS384 and HS512 tokens, or the public key for RS256/384/512, PS256/384/512, ES256/384/512 and EdDSA tokens. Public keys can be PEM (SPKI or PKCS#1), an X.509 certificate, a JWK, or a JWK Set (the token’s kid selects the key). EdDSA needs a browser with Ed25519 support in Web Crypto.

What does "Signature verified" prove?

It proves the token was signed with the key you supplied and has not been modified. It does not check the exp, nbf, aud or iss claims, so your server must still validate them. The expiry status shown on this page is informational only.

Why does the sample token show as valid and not expired?

The HS256 sample is signed with the secret shown in the verification box and has an expiry of 9999999999 (the year 2286), so it stays valid. Sample tokens for RS256, PS256, ES256 and EdDSA are signed with a throw-away key pair generated in your browser each time. Paste your own token to see its real expiry.

Why can’t my token be decoded?

A JWT has three dot-separated Base64URL segments. Whitespace, line breaks and a leading "Bearer " are ignored, but a token with five segments is an encrypted JWT (JWE) and cannot be decoded without the decryption key. The error message names the segment that is invalid.

What is a JWT algorithm confusion attack?

If a server verifies an HS256 token using its RSA or EC public key as the HMAC secret, an attacker who knows the public key can forge tokens. This tool warns you when an HMAC token is checked against something that looks like a public key. Always make your server accept only the algorithms it expects.

Want to create or sign a token? Try the JWT Encoder → Working with the raw segments? Try the Base64 Encoder/Decoder →