Skip to content
Devtoolry

JWT Generator

Create signed JSON Web Tokens online with HS256, HS384 or HS512 from a custom header and payload. Signing happens in your browser; the secret stays local.

Runs in your browser · Nothing uploadedFree · No sign-up

Something not working, or missing a feature? Send feedback

About the JWT Generator

The JWT Generator is an online JWT token generator for testing APIs and authentication flows. Edit the header and payload as JSON, choose an HMAC algorithm and sign with your own secret.

Everything runs in your browser, so your input is never uploaded to a server.

How to use the JWT Generator

  1. Edit the payload claims (for example sub, exp, roles).
  2. Choose HS256, HS384 or HS512 and enter a secret.
  3. Copy the signed token into your request or test.

Common mistakes

  • A short or guessable secret. HMAC tokens are only as strong as the secret. A word or short phrase can be brute-forced offline from a single token; use at least 32 random bytes for HS256.
  • exp in milliseconds. exp, iat and nbf are seconds since 1970, not milliseconds. A millisecond value puts the expiry tens of thousands of years in the future.
  • Secrets in the payload. The payload is only Base64URL-encoded, not encrypted. Anyone with the token can read it, so never put passwords or personal data in claims.

Works well with the JWT Generator

Frequently asked questions

How long should the secret be?

At least as long as the hash output: 32 random bytes for HS256, 48 for HS384 and 64 for HS512.

Can it create RS256 tokens?

No, it signs with shared-secret HMAC algorithms only.

Should I use tokens from this tool in production?

Use them for testing and development. Production tokens should be issued by your server, which keeps the secret out of any browser.

Is the secret sent anywhere?

No. Signing uses the Web Crypto API in your browser, so the secret never leaves your device.

Guides and tutorials