UTILS.
Private by default
JWT+

JWT Generator

Create a signed HS256 JSON Web Token from a JSON payload and a secret.

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →
HS256 only — header is fixed to {"alg":"HS256","typ":"JWT"}.
— output appears here —

About this tool

JWT Generator builds a signed JSON Web Token from a JSON payload and a secret. Edit the payload (a sample with sub, name and iat is pre-filled), enter your secret, and press Generate; the token appears as three dot-separated parts that you can copy.

The header is fixed to {"alg":"HS256","typ":"JWT"}. The header and payload are serialized as compact JSON, encoded as UTF-8 and then base64url without padding, and the signature is HMAC-SHA256 over header.payload computed with the browser's WebCrypto API using your secret text as UTF-8 key bytes. Only HS256 is supported; there is no RS256, ES256 or unsigned mode.

The tool does not add or change claims: iat, exp and nbf are included only if you type them, and times are numeric Unix seconds. An empty secret or text that is not valid JSON produces an error and no token. Be aware that the payload is re-serialized, so whitespace is removed, duplicate keys collapse to the last one, and integers beyond 2^53 lose precision. A JWT is signed, not encrypted, so anyone holding the token can read the payload. Nothing is uploaded; signing happens locally.

Frequently asked questions

Which algorithm does it use?
Only HS256 (HMAC with SHA-256). The header is fixed to {"alg":"HS256","typ":"JWT"} and the token is signed with your secret.
Does it add exp or iat automatically?
No. The payload is signed exactly as you provide it. Add iat, exp or nbf yourself as Unix timestamps in seconds.
Is the payload encrypted?
No. A JWT is only signed, and the payload is just base64url-encoded, so anyone with the token can decode and read it. Never put passwords or other secrets in the claims.
Is my secret sent anywhere?
No. The token is built and signed on your device with WebCrypto, and nothing leaves the browser. It needs a browser with WebCrypto support in a secure context.

More tools