About the JWT Decoder tool
A JSON Web Token (JWT) looks like a random string, but it is really three Base64URL-encoded parts separated by dots: a header that names the signing algorithm, a payload with claims about the user or session, and a signature. This JWT decoder splits the token, decodes the header and payload and shows them as neatly formatted JSON, with each part colour-coded in the original token.
Time-based claims are the ones people check most, so exp (expiry), iat (issued at) and nbf (not before) are converted from Unix seconds into readable dates in your local time zone, along with a relative time such as “in 58 minutes” or “3 days ago”. A status badge tells you straight away whether the token is expired, not valid yet, or still within its lifetime. If the token uses HS256, HS384 or HS512, you can enter the shared secret (as plain text or Base64) to verify the signature with the browser’s Web Crypto HMAC functions. Tokens signed with RS256, ES256 or other public-key algorithms can be decoded but not verified here.
Nothing is sent anywhere. Decoding and verification run entirely in your browser, so you can inspect production tokens without leaking them.
How to use JWT Decoder
- Paste the token into “Encoded JWT”, with or without the “Bearer ” prefix, or click “Load sample”.
- Read the status badge and the exp, iat and nbf dates at the top of the result.
- Review the decoded Header and Payload JSON, and copy either with its Copy button.
- To check the signature of an HS256, HS384 or HS512 token, type the “Secret key” and tick the Base64 option if your secret is encoded.
- Click “Download” to save the decoded header and payload as a JSON file, or “Clear” to start over.
Features
Instant decoding
Header and payload are Base64URL-decoded and pretty-printed as you paste.
Human-readable dates
exp, iat and nbf are shown as local dates with relative times.
Expiry status
See at a glance whether a token is expired, not yet valid or still active.
HMAC signature check
Verify HS256, HS384 and HS512 signatures with your secret using Web Crypto.
Clear error messages
Malformed tokens, encrypted JWEs and non-JSON parts are explained instead of failing silently.
Fully private
Your token and secret never leave the browser tab.
When to use it
- Check why an API returns 401 by looking at a token’s expiry and audience.
- Confirm which roles, scopes or user ID are inside an access token.
- Debug login flows with Auth0, Firebase, Cognito, Keycloak or your own server.
- Verify that your backend signs HS256 tokens with the expected secret.
- Teach or learn how JWTs are structured.
Frequently asked questions
Is it safe to paste a real token here?
Yes. The token is decoded in your browser and never transmitted. Still, treat live tokens like passwords and avoid sharing screenshots of them.
Can this tool verify RS256 or ES256 tokens?
Not currently. Signature verification supports only the HMAC algorithms HS256, HS384 and HS512. Other tokens are decoded but their signature is not checked.
Does decoding a JWT mean it is valid?
No. Anyone can decode a JWT because the payload is only encoded, not encrypted. A token is trustworthy only after its signature is verified with the correct key.
Why does my token show as expired?
Its exp claim is earlier than your device’s current time. If that seems wrong, check that your computer’s clock is correct.
What if the secret is Base64 encoded?
Tick “Secret is Base64 / Base64URL encoded” and the secret will be decoded to bytes before the HMAC is calculated.
Can it decode encrypted tokens (JWE)?
No. JWE tokens have five parts and their payload is encrypted, so it cannot be read without the decryption key.