JWT Generator

Create test JWT tokens with custom headers and payloads locally. Sign with HMAC-SHA256 using Web Crypto API.

JWT Generator
Create test JWT tokens locally. Sign with HMAC-SHA256 using Web Crypto API.
Ctrl+Enter Generate Web Crypto API
Header (JSON)Editable
Payload (JSON)Editable
Generated JWTRead only
ReadyBrowser only
Edit the header and payload, then click Generate to create a signed JWT.

How ZeroData protects your privacy

  • No Uploads: Tool input is processed in your browser and is not sent to ZeroData servers.
  • No Storage: Tool input is not saved by this website.
  • No Input Tracking: Analytics never receive the text, files, keys, or credentials you process.
  • Verifiable: Disconnect from the network after the page loads; local tool processing continues without uploading your input.

How to Use the JWT Generator

  1. Edit the header JSON (algorithm and type are pre-filled).
  2. Edit the payload JSON with your desired claims (sub, name, exp, etc.).
  3. Enter your HMAC secret key in the secret field.
  4. Click Generate to create a properly signed JWT token.

Common Use Cases

  • Generating mock tokens for automated API integration testing.
  • Simulating expired JWTs to test application session timeout logic.
  • Crafting tokens with custom role claims to verify RBAC implementation.
  • Creating development tokens without setting up a full identity provider.
  • Verifying backend token validation logic with specific HMAC signatures.

Frequently Asked Questions

What algorithms are supported for signing?

The generator currently supports HMAC algorithms, specifically HS256, which is the most common standard for symmetric signing.

Are the secret keys I input stored anywhere?

Absolutely not. All cryptographic signing happens locally in your browser, and keys are never transmitted or stored.

How do I add custom claims?

You can add custom claims by editing the JSON payload directly in the provided text area.

Can this generate RSA signed tokens (RS256)?

At present, the tool focuses on symmetric HMAC signatures for rapid testing and development workflows.

How are expiration times calculated?

Expiration times (exp) are typically calculated as Unix timestamps, representing seconds since the Epoch.

Related Tools