JWT Generator & Encoder
Create and sign JSON Web Tokens (JWT) in your browser — edit header and payload, pick HS256/384/512, and get a signed token. Your secret never leaves your device. Free.
🔒 Private by design
- The token is signed locally in your browser with the Web Crypto API — your secret never leaves your device.
- Supports HMAC algorithms (HS256, HS384, HS512).
- Remember: the header and payload are only base64url-encoded, not encrypted — never put secrets in the payload.
Free JWT Generator & Encoder
Create and sign JSON Web Tokens (JWT) in your browser. Edit the header and payload, choose HS256, HS384, or HS512, enter your secret, and get a signed token instantly. Everything is signed locally with the Web Crypto API, so your secret never leaves your device. Free, no sign-up.
What is a JWT?
A JSON Web Token (JWT) is a compact, URL-safe way to represent claims between two parties. It is made of three parts separated by dots: a header describing the algorithm, a payload holding the claims (such as a user ID or expiry time), and a signature that proves the token has not been tampered with. JWTs are widely used for authentication and stateless sessions in APIs and single-page apps.
The three parts of a JWT
Each token encodes three sections:
- Header — the token type and signing algorithm, for example HS256.
- Payload — the claims, base64url-encoded (not encrypted).
- Signature — an HMAC of the header and payload using your secret, which verifies integrity.
- The three parts are joined with dots: header.payload.signature.
How to generate a JWT
It is instant:
- Edit the header and payload JSON to include your claims.
- Pick an HMAC algorithm — HS256, HS384, or HS512.
- Enter the secret key used to sign the token.
- Copy the signed token, which updates live as you type.
Common JWT claims
The payload often uses a set of standard registered claims: sub (subject, usually a user ID), iat (issued-at timestamp), exp (expiry timestamp), iss (issuer), and aud (audience). You can also add your own custom claims like name or role. Timestamps are in seconds since the Unix epoch. Including an exp claim is strongly recommended so tokens do not stay valid forever.
Security: what a JWT does and does not protect
A signed JWT guarantees integrity — if anyone changes the header or payload, the signature no longer matches and the token is rejected. But it does not provide confidentiality: the payload is only base64url-encoded and can be read by anyone who has the token. Never put passwords or sensitive data in the payload. Keep your signing secret private and strong, since anyone with the secret can forge valid tokens.
Pro tip
Use a long, random secret (at least 256 bits for HS256) and store it securely on your server, never in client-side code. Always set an exp claim to limit a token's lifetime. To inspect or debug an existing token, use our JWT Decoder.
FAQ
Is this JWT generator free and private?
Which algorithms does it support?
Is the JWT payload encrypted?
What should I use as the secret?
How do I make a JWT expire?
What is the difference between HS256 and RS256?
How do I verify or read a token I generated?
Related tools
Pro tip: pair this tool with Upside Down Text Generator and Text Similarity Checker for a faster SEO workflow.