AG
JWT
DECODER
Decoder
Algorithms
Claims
Guides
About
한국어
English
日本語
中文
Español
Português
Français
Deutsch
Русский
العربية
Bahasa Indonesia
Decoder
/
Guides
/
JWT security checklist
Guide
JWT security checklist
A short checklist of the key principles for using JWT safely.
Reject alg=none and unexpected algorithms; only allow the algorithm you expect.
The payload is not encrypted, so never put passwords, personal data or other secrets in it.
Keep the lifetime short with exp, and control the validity window and reuse with nbf and jti.
When verifying the signature, also check that iss and aud match your expected values.
Secrets must be long and random, and must never be exposed to the client.
Try decoding a token yourself
Just paste and the header, payload and claims unfold instantly.
Open the decoder
Related
What is a JWT
A JWT (JSON Web Token) is a small, signed JSON token format for securely passing information between parties.
The three-part JWT structure
Every JWT consists of header.payload.signature, and each part is base64url encoded.
JWT vs session authentication
The difference between token (JWT) auth and server session (cookie) auth, and when to use each.
Common JWT errors and fixes
The errors you meet most often when working with JWT, with their causes and fixes.
Access tokens and refresh tokens
The role of the short-lived access token and the refresh token that renews it.