toolqik

53 · API & Webhooks

JWT Generator

Create signed JWTs with HS256, RS256, ES256, PS256 or EdDSA, with claim helpers.

Runs in your browser
Secret encoding
Token

About this tool

Testing an API that requires a JWT usually means fighting a login flow just to get a token. This generator creates signed JSON Web Tokens directly: edit the header and claims, choose an algorithm, and sign with a secret or private key. Click the claim buttons to add standard times such as exp one hour from now. Tokens are signed in your browser with the Web Crypto API.

Use test keys only. Signing a token with a production secret or private key in any website puts that key at risk. Generate a test key here, or use your own code for production keys.

Choosing an algorithm

  • HS256/384/512: one shared secret signs and verifies. Simple, but every verifier can also create tokens. The secret needs at least as many bits as the hash (32 bytes for HS256).
  • RS256 / PS256: an RSA private key signs, and anyone with the public key verifies. The common choice for identity providers.
  • ES256: ECDSA with smaller keys and signatures than RSA.
  • EdDSA: Ed25519, fast and compact, increasingly supported by JWT libraries.

Standard claims

ClaimMeaning
subSubject: who the token is about (usually a user ID)
iss / audIssuer, and the intended audience (your API)
iat / nbf / expIssued at, not before and expiry, in Unix seconds
jtiUnique token ID, useful for revocation lists

Check the result with the JWT Signature Verifier, or inspect it with the JWT Decoder.

FAQ

How do I create a JWT for testing?

Enter your claims, choose HS256 with a test secret (or generate a key pair for RS256 or ES256), and copy the signed token.

How long should an HS256 secret be?

At least 256 bits (32 bytes) of randomness. Click “Random secret” for a suitable one.

Which private key format is needed?

A PKCS#8 PEM (BEGIN PRIVATE KEY) or a private JWK. Convert older PEM keys with openssl pkey -in key.pem -out pkcs8.pem.

Is it safe to sign tokens in the browser?

Signing happens locally and nothing is uploaded, but you should still only use test keys on any website.

esc
↑↓ navigate↵ open