JWT Generator and Verifier
Create and verify JSON Web Tokens with HS256, RS256, PS256, ES256 or EdDSA. Edit claims, set exp and iat, and check signatures locally in your browser.
Keys and tokens are secrets. Everything is signed and verified locally with your browser's Web Crypto API: nothing is uploaded.
Create a signed JWT
This browser does not support Ed25519 in Web Crypto, so EdDSA is unavailable.
Test keys are generated in your browser and filled in below. Keep the private key or secret to yourself; share only the public key.
Verify a JWT
How to create a signed JWT
- Choose the Algorithm: HS256/384/512 (shared secret), RS256/384/512 or PS256/384/512 (RSA), ES256/384/512 (ECDSA on P-256, P-384 or P-521), or EdDSA (Ed25519, when your browser supports it).
- Edit the Header (JSON) and the Payload (JSON claims). The
algfield always follows the selected algorithm, andtypdefaults toJWT. - Use the time claim buttons to add dates: iat = now, nbf = now, or pick a delay such as “in 1 hour” and click Set exp. The values are NumericDates: seconds since 1 January 1970 UTC.
- Enter the Secret (HS algorithms, as text or Base64/Base64url under Secret format) or the Private key (PEM or JWK). No key yet? Click Generate test key.
- Click Sign token, then Copy the result or click Verify this token to check it right away.
How to verify a JWT
- Paste the token under Token to verify.
- Pick the Expected algorithm. Leaving it on “From the token header” accepts whatever the header says, except
none; choosing a specific algorithm makes the tool refuse any token signed differently, as a real server should. - Enter the secret, or the Public key (PEM or JWK): a
PUBLIC KEY,RSA PUBLIC KEYorCERTIFICATEPEM block, a JWK, or a JWK Set (the key whosekidmatches the header is used). - Optionally set a Clock leeway (seconds) to tolerate small clock differences, then click Verify token.
The result says whether the signature is valid, and then checks exp (expiration) and nbf (not before) against your computer’s current time. A token with a correct signature but an expiry in the past is reported as expired, not as valid.
Keys and formats
For signing, the tool accepts PKCS#8 PRIVATE KEY blocks, PKCS#1 RSA PRIVATE KEY and SEC1 EC PRIVATE KEY blocks (converted to PKCS#8 internally), and private JWKs. Password-protected keys must first be exported without a password. Generate test key creates a random secret of the hash size for HS algorithms, a 2048-bit RSA key pair for RS and PS, the matching curve for ES, or an Ed25519 pair. You get the keys as PEM and JWK, and they are filled in on both sides so a round trip works immediately.
Signatures follow RFC 7515 and RFC 7518: RSA-PSS uses a salt as long as the hash, and ECDSA signatures are the raw r||s concatenation. The implementation reproduces the HS256 example of RFC 7515, Appendix A.1.
Security notes
- Everything runs in your browser with the Web Crypto API. Neither the tokens nor the keys are sent anywhere, but still prefer test keys over production secrets.
alg: noneis never signed and never accepted.- HMAC secrets should be at least as long as the hash (32 bytes for HS256). A shorter secret triggers a warning.
- A signature proves integrity and origin, not that the claims are appropriate: servers must also check
iss,audand the scopes.
Frequently asked questions
What is the difference between HS256 and RS256?
HS256 uses one shared secret both to sign and to verify, so every verifier could also forge tokens. RS256 (and PS256, ES256, EdDSA) signs with a private key and verifies with a public key that can be published safely.
Why does a valid signature still show an error?
Because the token is outside its validity period: exp is in the past or nbf is in the future. The signature check and the time check are reported separately.
Why is alg "none" refused?
An unsigned token can be created by anyone. Accepting it was a classic vulnerability of JWT libraries, so this tool rejects it both when signing and when verifying.
Can I use my own RSA or EC key?
Yes. Paste the private key as PEM or JWK to sign, and the public key to verify. The tool checks that the key type and curve match the selected algorithm.
Why is EdDSA disabled?
Your browser does not support Ed25519 in Web Crypto yet. Recent versions of Chrome, Edge, Firefox and Safari do.
Related tools
- JWT Decoder Decode a JWT header and payload, read exp, iat and nbf as dates, and verify HS256, RS256, PS256, ES256 or EdDSA signatures locally in your browser.
- HMAC Generator Compute an HMAC-SHA1, SHA-256, SHA-384 or SHA-512 with a text, hex or Base64 key, get hex and Base64 output, and check a webhook signature in your browser.
- Unix Timestamp Converter Convert Unix timestamps in seconds or milliseconds to readable dates in local time, UTC and ISO 8601, and turn any date back into epoch time.
- JSON Formatter and Validator Free JSON formatter and validator that beautifies, minifies and checks JSON in your browser, with syntax errors reported by line and column.