Generate a signed RS256 JWT with an RSA 2048-bit key pair for testing OAuth2 and OIDC authentication flows. Includes iss, aud, sub claims and 24h expiry.
No custom claims added
This example configures the JWT Generator for RS256 with OAuth2 and OpenID Connect claims. The tool generates a new RSA 2048-bit key pair on load and signs a JWT with iss, aud, sub, and standard profile claims.
The output includes the JWT string and the PEM formatted public key you need to configure on your API server. The private key is displayed in a collapsible section for debugging and local development.
OAuth2 and OpenID Connect mandate asymmetric signing for production deployments. The authorization server holds the private key and signs tokens. Resource servers (your APIs) hold only the public key and verify tokens without ever seeing the private key.
βββββββββββββββ signs with ββββββββββββββββ
β Auth Server β ββ private key βββ β JWT β
β (Keycloak) β β β
βββββββββββββββ ββββββββ¬ββββββββ
β
verifies with
public key
β
ββββββββΌββββββββ
β API Server β
ββββββββββββββββ
This means you can have many API servers each configured with the same public key, without ever distributing a shared secret. If a server is compromised, the attacker gains the ability to verify tokens but not to forge them.
| Claim | Value | Purpose |
|---|---|---|
iss |
https://auth.example.com | Identifies the issuer |
sub |
a1b2c3d4 | Stable user identifier |
aud |
https://api.example.com | Intended audience |
name |
Demo User | Display name |
email |
demo@example.com | Email address |
exp |
+24 hours | Token expiry |
iat |
now | Token issue time |
jti |
auto generated | Unique token ID |
A realistic OAuth2 flow involves the authorization server returning a JWT, the client sending it to the API, and the API verifying it against a trusted public key. With this tool you simulate the first step and use the generated public key to configure the verification step.
For integration tests, extract the generated private key and configure your test identity provider stub to sign tokens with it. This lets your tests verify the entire auth chain without external dependencies.
Use the JWT Decoder to inspect tokens your identity provider issues. The JSON Formatter helps structure the claim payload during development.
Nothing you paste leaves this tab. Every tool runs entirely in your browser β no upload, no server, no account.