How to use it
- 1.Paste the token into the box, with or without the “Bearer” prefix. The header and payload are decoded as you type.
- 2.Check the status line: it says whether the token is valid, expired or not valid yet, based on its
expandnbfclaims. - 3.Read the standard claims (issuer, subject, audience and times), with timestamps shown as dates in your time zone.
- 4.To check the signature, enter the shared secret for
HS256tokens, or paste the public key or JWK set forRS256,ES256and other key-pair algorithms.
What’s inside a JWT
A JSON Web Token is three Base64URL-encoded parts joined by dots: header.payload.signature. The header says how the token is signed, for example {"alg":"HS256","typ":"JWT"}. The payload holds the claims: statements about the user and the token, such as a user ID, roles and an expiry time. The signature proves that the first two parts come from whoever holds the key and haven’t been changed.
Base64URL is an encoding, not encryption: anyone who has the token can read its payload, exactly as this tool does. Never put passwords or other secrets in a JWT. If the contents must stay confidential, the issuer has to use an encrypted token (JWE), which has five parts and can only be read with the right key.
Standard claims and expiry
RFC 7519 defines seven registered claims. iss (issuer) names who created the token, sub (subject) whom it is about, usually a user ID, and aud (audience) which service it is meant for. exp (expiration time), nbf (not before) and iat (issued at) are timestamps in seconds since 1 January 1970, and jti is a unique ID that lets a server spot a token being reused.
A server must reject a token after its exp time and before its nbf time. Short lifetimes (often 5 to 60 minutes for access tokens) limit the damage if a token is stolen, which is why apps use refresh tokens to get new ones.
Checking the signature
Decoding shows what a token claims; only the signature tells you whether to believe it. HS256, HS384 and HS512 use a shared secret known to both the issuer and the server. RS256, PS256, ES256, EdDSA and similar algorithms use a key pair: the issuer signs with its private key and anyone can verify with the public key. Identity providers publish their public keys as a JWK set, often at a URL ending in /.well-known/jwks.json.
Verification runs locally with your browser’s Web Crypto API, and nothing you paste is sent anywhere. Even so, handle production secrets with care, and remember that a private key is never needed to verify a token, so paste only public keys.
Questions and answers
Is it safe to paste a JWT here?
Yes. The token is decoded and verified in your browser and never sent to nestoo or anyone else. Keep in mind that a valid access token works like a temporary password: anyone who copies it can use it until it expires, so don’t share live tokens in chats or tickets.
Can a JWT be decoded without the secret?
Yes. The header and payload are only Base64URL-encoded, so anyone can read them without a key. A secret or private key is needed to create a valid signature, and the secret or public key to verify one.
Why does my token show “Invalid signature”?
Usually the secret or key is wrong: a key from another environment, a secret that must be Base64-decoded first, or a public key with a different kid. It also happens when the token was changed or cut short while copying. For tokens from an identity provider, use the provider’s current JWK set.
What is the difference between JWS and JWE?
A JWS is a signed token with three parts: anyone can read it, but nobody can change it without breaking the signature. A JWE is an encrypted token with five parts, and only the holder of the decryption key can read its content. Most tokens people call JWTs are JWS.
What do exp, iat and nbf mean?
They are times in seconds since 1 January 1970, known as Unix time. exp is when the token expires, iat when it was issued, and nbf the moment before which it must not be accepted. This tool shows them as dates in your time zone and tells you how long ago or how soon they are.