A JSON Web Token is a compact, signed (and optionally encrypted) string that carries claims, such as who a user is and when the token expires.
A JSON Web Token, or JWT, is defined in RFC 7519. It has three base64url-encoded parts separated by dots: a header naming the algorithm, a payload of claims such as sub, iss, aud, exp and iat, and a signature. Anyone who holds a signed JWT can read its claims, because signing is not encryption; what the signature gives you is proof that the issuer produced it and that it has not been altered. Servers can check a JWT without a database lookup, which is why they are popular for access tokens and for OpenID Connect ID tokens. That convenience brings pitfalls documented in RFC 8725, the JWT Best Current Practices: always verify the signature, pin the expected algorithm so the none algorithm and algorithm-confusion attacks fail, check iss, aud and exp, and keep lifetimes short. Because a stateless JWT stays valid until it expires, revocation is hard, so short lifetimes and refresh tokens are common. Never put secrets in the payload, and treat a JWT as a bearer token: anyone who copies it can use it until it expires. When pasted into logs or chats it is a leak. BotPassword keeps tokens like these out of agent transcripts.