Build and sign a JSON Web Token with HS, RS, PS or ES algorithms, generate secrets or key pairs, and verify the result in your browser.
Initializing in your browser…
Decode a JSON Web Token instantly, check its expiry and claims, and verify the signature with a secret, PEM key or JWKS, all in your browser.
Sign a PDF: draw, type or upload your signature, tap where it goes, and download. Transparent, so it never hides the signature line.
Generate colour palettes from one base colour, with tints and shades, contrast and colour-blindness checks, and CSS, Tailwind or JSON export.
You are testing an API route that checks roles, and need a valid token for user_42 with the tester role that lasts one hour.
Settings
Algorithm HS256
Secret a-development-secret-of-at-least-32-bytes (text)
Key ID key-2026-10
Payload {"sub":"user_42","role":"tester","iat":1792483200,"exp":1792486800}Signed token, 198 characters
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImtleS0yMDI2LTEwIn0 .eyJzdWIiOiJ1c2VyXzQyIiwicm9sZSI6InRlc3RlciIsImlhdCI6MTc5MjQ4MzIwMCwiZXhwIjoxNzkyNDg2ODAwfQ .fln7LrTZ6s05V5r_u9bZH5aOxLrPzSxlKQOrOy-j7p8 Verified: this token checks out against the secret with HS256.
The header records the algorithm and the key ID, the payload holds the claims, and the third part is the HMAC-SHA256 of the first two. iat is 08:00 UTC and exp 09:00 UTC on 20 October 2026, so the token is valid for exactly one hour. The secret is 41 bytes, 328 bits, comfortably above the 256-bit minimum for HS256; a shorter one such as your-256-bit-secret (152 bits) would still sign but triggers a warning. Paste the token into the JWT Decoder with the same secret and it verifies, while changing a single character of the payload makes it fail.
Create a signed JSON Web Token from your own payload with HS256 to HS512, RS256 to RS512, PS256 to PS512 or ES256 to ES512, and copy it straight into an API request or a test. The tool can generate a strong secret or a key pair for you, warns about secrets that are too short, and verifies every token it produces.
A JWT is three base64url parts joined by dots: a header naming the algorithm, a payload of claims, and a signature over the first two. To build one, choose an algorithm, provide a key, edit the JSON payload, and the signed token appears below as you type, colour-coded by part. Buttons add the standard claims (iss, sub, aud, exp, nbf, iat and a random jti) and set an expiry five minutes, an hour, a day or thirty days ahead, filling in the current time for iat.
HMAC algorithms (HS256, HS384, HS512) use one shared secret for signing and verifying. The secret can be typed as text or supplied as base64, base64url or hex, and the choice matters: many services publish their HMAC secret in base64, and signing with those characters as plain text gives a token the service rejects as if the secret were wrong. RFC 7518 requires a secret at least as long as the hash, 256 bits for HS256, and the tool warns when yours is shorter, because a short secret still produces a signature that verifies and is otherwise easy to overlook. Generate creates a random secret of the right length.
RSA (RS and PS) and elliptic curve (ES) algorithms sign with a private key and verify with the public key, so the party that checks tokens never holds the power to create them. Paste a private key in PKCS#8 PEM format, or press Generate a key pair to create one in your browser for the selected algorithm: a 2048-bit RSA key, or a P-256, P-384 or P-521 key for ES256, ES384 or ES512. The matching public key is shown so you can copy it to the verifying service.
The header is built for you and always names the algorithm the signature was really made with; you can add a key ID (kid) so a server holding several keys knows which one to use. The payload is checked as you type: invalid JSON, a time claim written as a string or in milliseconds, or an exp that is already in the past are pointed out. After signing, the tool verifies the new token against the secret or public key, which confirms the key and token belong together.
Keys and tokens never leave your browser. Even so, a secret typed into any web page should be treated as a development or test secret; keep production signing keys in your server's secret store.
Make a token with the exact subject, roles and expiry your endpoint expects, and paste it into an Authorization: Bearer header.
Create a token that expires in five minutes, or one with exp already in the past, to check that your app rejects stale tokens.
Generate an ES256 key pair, sign a test token with the private key and give the public key to the service that will verify it.
Change one character of the payload and watch the whole signature change, then check the result in the JWT Decoder.
HS256 when the same service creates and checks the tokens. RS256 or ES256 when other services must verify tokens without being able to create them, because they only need the public key. ES256 gives much shorter signatures than RS256.
At least as long as the hash: 256 bits (32 bytes) for HS256, 384 for HS384 and 512 for HS512, as RFC 7518 requires. The Generate button creates a random secret of exactly the right size.
Most often the secret encoding. If the secret you were given is base64, choose Base64 so the decoded bytes are used. Also check the algorithm, the audience and issuer claims, and the server clock against exp and nbf.
PKCS#8 PEM, the block that starts with -----BEGIN PRIVATE KEY-----. Generate a key pair creates one in that format along with the matching public key.
Nothing is sent anywhere, but you should still treat any secret entered in a web page as a test secret. Production signing keys belong in your server's secret management, not in a browser tab.
Conversions run on your device in JavaScript. The values you enter are never sent over the network.