The three parts of a JWT
A JWT is three Base64URL segments joined by dots: header.payload.signature. The header names the algorithm (HS256), the payload holds your claims (such as sub, exp and any custom data), and the signature is an HMAC over the first two parts using your secret. The header and payload are only encoded, not encrypted — anyone can read them — so never put secrets in the payload.