Tool

JWT Encoder

Construct and sign JSON Web Tokens with custom headers and payloads. Signing uses HS256 via the Web Crypto API — client-side only.

Last updated July 1, 2026

Runs entirely in your browser — no data sent to servers. Privacy policy
Prove it runs locally
  1. Open DevTools → Network tab
  2. Click Generate
  3. Confirm zero outbound requests for the secret

Generation uses crypto.getRandomValues() in your browser. Privacy policy

How to Use This Tool

Edit the header JSON to set your algorithm (HS256 is selected by default) and token type. The header is automatically base64url-encoded when the token is generated.

Edit the payload JSON to include your claims. Standard claims include "sub" (subject), "exp" (expiration as a Unix timestamp), "iat" (issued at), and "aud" (audience). Add any custom claims your application needs.

Enter your HS256 secret key and click "Encode" to generate a signed JWT. Copy the resulting token to use in your application or to test with the JWT Validator tool. Optional CLI snippets below show jsonwebtoken / jose / PyJWT sign equivalents.

Continue learning