Skip to content
Tools

JWT Generator

Create and sign a JSON Web Token with HS256, HS384 or HS512.

Local
The token is signed in your browser. Your payload and secret are never uploaded.
Signed token

What this tool does

This tool signs a JSON Web Token. Enter the payload as JSON and a secret, pick an HMAC algorithm, and it produces a signed token. The signing happens in your browser with the Web Crypto API.

Which algorithms

It signs with HMAC: HS256, HS384 or HS512. These use a shared secret, so the same secret signs and verifies. Asymmetric algorithms such as RS256 and ES256 use a private key to sign and a public key to verify, which this tool does not handle.

Keep the secret secret

Anyone who has the signing secret can mint valid tokens, so use a long, random secret and never ship it to the browser in a real application. Sign tokens here for testing or for a secret you control. The payload is Base64URL-encoded, not encrypted, so never put anything sensitive in it.

Common use cases

  • Creating a test token with specific claims.
  • Reproducing a token to debug an auth flow.
  • Checking how a payload and secret produce a signature.

Frequently asked questions

Which algorithms are supported?
HMAC with a shared secret: HS256, HS384 and HS512. RS and ES algorithms need a key pair and are not supported here.
Is my secret uploaded?
No. The token is signed in your browser with the Web Crypto API. Your payload and secret never leave the page.

Learning resources

Testsmith also runs hands-on courses and a free practice app for the skills behind this tool.

Feedback welcome

Found a bug in this tool, or want it to do something it does not? Tell us and we will take a look.