How to decode a JWT
- Paste the token into the box. It usually starts with "eyJ".
- The header and payload are decoded instantly and shown as formatted JSON.
- The signature is shown as its raw base64url string.
- Copy any of the three parts with its copy button.
What is a JSON Web Token?
A JSON Web Token (JWT, defined in RFC 7519) is a compact way to pass claims between two parties, most often an access token issued by a login server and sent with every API request in the Authorization header.
A JWT has three parts separated by dots. Each part is base64url-encoded, which is an encoding and not encryption, so anyone holding the token can read the header and payload.
header.payload.signature
// Header
{
"alg": "HS256",
"typ": "JWT"
}
// Payload
{
"sub": "1234567890",
"name": "Jane Doe",
"iat": 1735689600,
"exp": 1735693200
}Standard claims you will see in the payload
- iss (issuer): who created the token, for example your identity provider.
- sub (subject): the user or entity the token is about, usually a user ID.
- aud (audience): the API or application the token is meant for.
- exp (expiration time): when the token stops being valid, as a Unix timestamp in seconds.
- nbf (not before): the token must not be accepted before this time.
- iat (issued at): when the token was created.
- jti (JWT ID): a unique identifier, often used to prevent replay.
Decoding is not verifying
This tool decodes the token so you can inspect it while debugging. It does not check the signature, because that requires the secret or public key of the issuer.
Your backend must always verify the signature, the expected algorithm, and the exp, iss and aud claims before trusting a token. Never make access decisions from a decoded payload alone.
Frequently asked questions
- Is it safe to paste my JWT here?
- The token is decoded in your browser and is not sent to any server. Still, a valid JWT works like a password until it expires, so prefer expired or test tokens when you only need to inspect the structure.
- Does this tool verify the JWT signature?
- No. It only decodes the header and payload. Signature verification needs the signing secret or public key and should happen on your server with a JWT library.
- Why can anyone read the contents of a JWT?
- The header and payload are base64url-encoded, not encrypted. The signature only proves the token was not modified. Do not put passwords or other secrets in a JWT payload; use JWE if the contents must be encrypted.
- How do I read the exp and iat values?
- They are Unix timestamps: the number of seconds since January 1, 1970 UTC. For example, 1735689600 is January 1, 2025 at 00:00 UTC. If exp is in the past, the token has expired.
- Why do I get "Invalid JWT format"?
- A signed JWT must have exactly three dot-separated parts. Check that you copied the whole token without the "Bearer " prefix, quotes or line breaks. Encrypted tokens (JWE) have five parts and cannot be decoded here.
- What is the difference between HS256 and RS256?
- HS256 signs the token with a shared secret, so the same key signs and verifies. RS256 signs with a private key and verifies with a public key, which lets many services check tokens without being able to create them.