🌐 English

Home › Guides

JWTs: structure and safe use

The long token string you get after logging in is usually a JWT. Here's what's inside and how to keep it safe.

Three parts

The three dot-separated parts are the header (algorithm), the payload (contents like the user ID and expiry) and the signature. The first two are only Base64URL-encoded, so anyone can read them.

Expiry times

exp is when the token expires, iat when it was issued and nbf when it becomes usable — all Unix times in seconds. The shorter the lifetime, the smaller the damage if a token leaks.

Common security mistakes