Generate a JWT

Enter a secret to sign the token.

Make a signed token to test an API, a middleware or an auth flow. Edit the claims, set an expiry, enter the shared secret and copy the token. The secret never leaves your browser.

  • Free
  • Runs in your browser
  • HS256, HS384, HS512
  • No sign-up
How it works

How It Works

Create a token in three steps.

01

Write the payload

Edit the JSON claims: subject, name, roles or anything your API reads.

02

Choose algorithm and secret

HS256 is the most common. Add iat and exp if your API checks them.

03

Copy the token

Send it in an Authorization: Bearer header.

About

How is a JWT signed?

A JSON Web Token is three Base64URL parts joined by dots: a header naming the algorithm, the payload with your claims, and a signature. With HS256 the signature is an HMAC-SHA256 of the first two parts using a shared secret, so anyone with the same secret can check the token was not changed. This generator builds the header, encodes the payload and signs it with your browser's Web Crypto API.

RS256 and ES256 tokens are signed with a private key instead of a shared secret and are not offered here. Never paste a production private key into a website.

Three HMAC algorithms

HS256, HS384 and HS512, using SHA-256, SHA-384 or SHA-512.

iat and exp helper

Adds the current Unix time as iat and an expiry a number of minutes ahead as exp.

Base64 secrets

Tick the option when your secret is stored Base64-encoded, as some frameworks do.

Secret stays local

Signing happens in your browser; the secret is never sent anywhere.

Features

Why Use This JWT Generator

Test tokens without writing a script.

Edit any claim

The payload is plain JSON, so custom claims are easy.

Expiry in one click

iat and exp set from the current time.

Pairs with the decoder

Check the result with the JWT Decoder.

Private

Secrets stay in the browser.

✓ No Registration✓ Free✓ Browser-based✓ Text Stays Local
FAQ

Frequently Asked Questions

Questions people ask about the JWT Generator.

At least 32 random bytes. The JWT standard (RFC 7518) requires a key at least as long as the hash output: 256 bits for HS256, 384 for HS384 and 512 for HS512.