Guide
How JSON Web Tokens (JWT) Work and How to Decode Them
Learn the three parts of a JWT, what decoding reveals, and the security rules for using tokens safely.
A JWT decoder splits a JSON Web Token into its header, payload, and signature and shows the payload as readable JSON. It is a debugging tool for anyone building or consuming authenticated APIs.
The three parts of a JWT
A JWT is three Base64url-encoded parts separated by dots: header.payload.signature. The header describes the token type and signing algorithm. The payload carries claims — statements about the user or session, such as an expiry time or user id. The signature lets the server verify the token has not been tampered with.
What decoding reveals
Decoding (as opposed to verifying) simply Base64-decodes the header and payload so you can read the claims. Common claims include "iss" (issuer), "sub" (subject), "exp" (expiry), and "iat" (issued-at). Decoding does not check the signature — anyone can decode a JWT; only the server with the secret can verify it.
How to use a JWT decoder
- Paste the full JWT (all three parts, separated by dots).
- Read the decoded header and payload as JSON.
- Check the expiry ("exp") to see if the token is still valid.
Examples
A token's payload might decode to {"sub":"12345","name":"Jane","exp":1735689600}, showing the user id, display name, and a Unix expiry timestamp. Converting 1735689600 to a date tells you when the token expires.
When a JWT decoder is useful
- Debugging authentication failures in an API.
- Inspecting claims without writing code.
- Checking token expiry during a session issue.
- Learning how JWT-based auth is structured.
Security rules
Never put secrets in a JWT payload — it is only encoded, not encrypted, and anyone can read it. Always verify the signature server-side before trusting any claim, and use HTTPS to keep tokens confidential in transit.
Put it into practice
Use the JWT Decoder right now — free, in your browser, no sign-up required.
Try the JWT DecoderMore guides
- How to Unscramble Letters Into Words
- How to Find Anagrams of Any Word
- How to Count Words, Characters and Reading Time Accurately
- How to Find Words by Pattern, Length and Letters
- How to Use a Random Word Generator for Games, Writing and Brainstorming
- How to Count Characters (With and Without Spaces)
- How to Convert Text Between Cases (UPPER, lower, Title, camelCase and More)
- How to Clean Up Messy Text (Spaces, Line Breaks and Whitespace)
Related free tools
More free online utilities that pair well with this one — same-category tools for the same task, plus handy extras from other categories.
More developer & security tools
- Base64 Encoder / DecoderConvert plain text or images to Base64 strings
- HTML Entity Encoder / DecoderEncode & decode HTML entities
- YAML to JSON ConverterConvert YAML to JSON and JSON to YAML
- Cron Expression GeneratorBuild cron expressions & see next runs
- JSON Formatter & ValidatorIndent, format, and check raw JSON strings
You might also need
- Base64 Image Encoder / DecoderConvert images to Base64 & Base64 back to images
- Dummy Data (JSON/CSV) GeneratorGenerate fake JSON & CSV test data
- Hash-based Secret Key GeneratorGenerate random API keys & secret tokens
- SVG OptimizerMinify & clean SVG files for the web
- Age CalculatorCalculate age from any birthdate