QiLing Tools

🔏JWT Generator Online - Create, Sign and Verify JWTs with HS256, RS256, ES256 and PS256

Building authentication, debugging an API gateway or writing integration tests often means you need a JWT with specific claims and a specific algorithm. Edit the header and payload JSON, pick an algorithm and key, and the token is signed live. HMAC (HS256/384/512) accepts text, Base64 or hex secrets and warns when a secret is shorter than RFC 7518 requires. RSA (RS256/384/512), RSA-PSS (PS256/384/512) and ECDSA (ES256/384/512) accept PKCS#8, PKCS#1 (BEGIN RSA PRIVATE KEY) or SEC1 (BEGIN EC PRIVATE KEY) private keys or a private JWK — or generate a test key pair in one click, with the public key as PEM and as a JWK carrying an RFC 7638 thumbprint kid, ready for a JWKS. Quick buttons add iat, nbf and exp (+15 minutes to +30 days) and fill in the iss, sub, aud and jti registered claims. The Verify tab checks a token against a secret, public key PEM, X.509 certificate or JWK/JWKS, validates exp, nbf and iat with a configurable clock leeway, can pin the expected algorithm, and always rejects alg: none. To simply inspect a token, use the JWT decoder on this site.

Free · No sign-up · Runs in your browserLast updated:

Loading tool...

How to use JWT Generator & Signer

  1. 1Choose an algorithm, then enter an HMAC secret, paste a private key or generate a key pair
  2. 2Edit the header and payload, using the quick buttons for iat, exp and other claims
  3. 3Copy the signed JWT, or switch to Verify to check a token with a secret or public key

FAQ

What is the difference between HS256 and RS256 / ES256?
HS256 is symmetric: the issuer and verifier share one secret, which suits a single service. RS256, PS256 and ES256 are asymmetric: tokens are signed with a private key and verified with a public key that can be published to other services or a JWKS, which suits multi-service and third-party verification. ES256 has shorter keys and signatures; PS256 uses the more modern RSA-PSS padding.
How long should an HMAC secret be?
RFC 7518 requires the key to be at least as long as the hash output: 32 bytes (256 bits) for HS256, 48 bytes for HS384 and 64 bytes for HS512. The tool warns when a secret is too short. In production use a high-entropy random secret such as the one from the Random button, not a memorable password.
Why does verification say the signature is invalid?
Common causes are a wrong key or wrong secret format (a Base64 secret treated as text), an algorithm mismatch such as an RSA public key for an ES token, a token truncated or padded with spaces when copied, or a modified header or payload. If the signature is valid but the token is expired or not yet valid, the exp and nbf problems are listed separately.
Is it safe to create and sign JWTs in a web page?
Signing, verification and key generation all run locally through the browser’s WebCrypto API, and keys and tokens are never sent to a server. Even so, use it for development and test keys only, and never paste production private keys or long-lived tokens into any web page.