JWT Generator

Create signed JSON Web Tokens with custom claims for testing and development.

Free, no sign-upRuns in your browserWorks on any device
0
Token Length
—
Signature
—
Expiration
JWT Token
Header
Secret Key
Payload Claims
Subject (sub)
Issuer (iss)
Audience (aud)
Expiration (exp) - minutes from now
Not Before (nbf) - minutes offset

About the JWT Generator

When building or testing an API you often need valid tokens with specific claims. The JWT Generator creates HMAC-signed tokens using HS256, HS384 or HS512 with your own payload and secret.

Use the inspector to decode and check tokens. Signing uses the Web Crypto API in your browser.

How to use the JWT Generator

  1. Choose a signing algorithm.
  2. Edit the payload claims and expiry.
  3. Enter a secret key.
  4. Generate and copy the token.

Key features

  • HS256, HS384 and HS512
  • Custom claims and expiry
  • Token inspector
  • Web Crypto signing

HMAC signing algorithms

HS256, HS384 and HS512 sign tokens with HMAC using SHA-256, SHA-384 or SHA-512 and a shared secret. The same secret creates and verifies the signature, so it must be kept private on the server. Longer hashes are not meaningfully safer for typical use; a long, random secret matters far more than the algorithm choice.

Tokens are signed in your browser with the Web Crypto API, so your test secret is never sent to us. For production systems, generate tokens on your server and keep secrets out of browsers entirely.

Common uses

  • Creating test tokens for API development and Postman collections.
  • Testing how an app handles expired or malformed tokens.
  • Learning how JWT claims and signatures work.
  • Reproducing authentication bugs with specific claims.

Tips for the best results

  • Use a secret of at least 32 random characters for HS256.
  • Set a short exp for test tokens so they cannot be reused for long.
  • Include an iat (issued at) claim so you can tell when each test token was created during debugging.

Frequently asked questions

Should I use this for production secrets?

Use test secrets only. Production tokens should be generated by your own server.

What is HS256?

HMAC with SHA-256, a symmetric algorithm that uses one shared secret to sign and verify.

Can I set an expiry?

Yes. Add an exp claim with a future Unix timestamp.

Does it support RS256?

This generator uses HMAC algorithms. RS256 needs a private key, which should normally stay on a server.

Can I set an expiry time?

Yes. Add an exp claim with a Unix timestamp, or use the expiry option to set it automatically.

Related developer tools

View all →