How to use it
- Enter header and payload JSON (or use Sample).
- Optionally add a signature.
- Click Encode JWT and copy the token.
Why use it
- Build test tokens for auth and API work.
- Create signed-looking tokens for local debugging.
- Generate example JWTs for documentation.
- Runs locally so your data stays private.
- Free with no account or limits.
How JWT encoding works
A JSON Web Token (JWT) is built from three Base64URL-encoded segments separated by dots:header.payload.signature. The header describes the token type and the signing algorithm, and the payload holds the claims. This encoder composes the three-part structure from the JSON you provide:
- Header: typically the algorithm (for example
alg:nonefor a test token orHS256for a signed one). - Payload: your claims, such as
sub,exp, andiat. - Signature: a Base64URL-encoded value; leave it empty for an unsigned (alg: none) token used mainly for local testing.
The result round-trips with this site's JWT Decoder, so you can encode a token and immediately decode it to verify the header and payload.