JWT Generator

Create HS256 JWT from payload and secret.

Developer

Enter a JSON payload and secret to generate an HS256-signed JWT. Useful for testing APIs and auth flows. Runs in your browser — nothing is sent to a server.

About JWT Generator

A JWT (JSON Web Token) has three parts: header, payload, and signature. This tool builds an HS256 JWT from your JSON payload and secret key. Use it to create tokens for testing APIs or auth. Decode them with the JWT Decoder tool to verify.

How to use

  1. Enter a valid JSON object as the payload (e.g. sub, exp, iat).
  2. Enter the secret key used to sign the token.
  3. Click Generate JWT. Copy the token.

Frequently Asked Questions

What algorithm is supported?
This tool creates JWTs signed with HS256 (HMAC-SHA256). For RS256 you would need a different tool or backend.
Is my payload or secret sent to a server?
No. Encoding and signing happen in your browser using the Web Crypto API. Nothing is uploaded.
Can I set expiration (exp)?
Yes. Add "exp" (and optionally "iat", "nbf") to your payload as Unix timestamps. The tool does not add them automatically.