Security

How to Decode a JWT Token

Step-by-step tutorial for decoding a JSON Web Token, reading its header, payload, and signature, and checking expiration without sending the token to any server.

## What You Will Learn A JSON Web Token (JWT) is not encrypted. It is Base64URL-encoded, which means anyone with the token string can read its header and payload. This tutorial shows you how to decode a JWT token safely and what each part tells you. --- ## The Three Parts of a JWT A JWT has three parts separated by dots: ``` header.payload.signature ``` 1. **Header**: declares the token type and signing algorithm (e.g. `HS256`, `RS256`). 2. **Payload**: contains the claims (e.g. user ID, issuer, expiration). 3. **Signature**: verifies the token was issued by a trusted party. --- ## How to Decode a JWT Token (Step by Step) 1. Copy the full JWT string (including all three dot-separated parts). 2. Open the [LABSTACK JWT Decoder](/tools/jwt-decoder). 3. Paste the token into the input field. 4. Read the decoded Header and Payload shown below. 5. Check the expiration status before relying on any claim. --- ## What Decoding Does and Does Not Tell You **Decoding reveals:** - The algorithm used to sign the token - The claims inside the payload (subject, issuer, issued-at, expiration) - Whether the token is structurally valid **Decoding does NOT verify:** - That the token was issued by your server - That the signature is valid - That the token has not been tampered with Signature verification requires your secret key or public key and must be done on your server. Never treat a decoded JWT as proof of identity. --- ## Security Reminder The [LABSTACK JWT Decoder](/tools/jwt-decoder) runs 100% in your browser. The token is never sent to a server. Still, as a best practice, do not paste live production tokens containing sensitive customer data into any online utility. [Decode a JWT now](/tools/jwt-decoder).