JWT Encoder & Verifier
Encode and verify HMAC-signed JWTs (HS256, HS384, HS512) in your browser and check their time claims.
- Runs locally in your browser
- No upload required
Try it
Supported formats
Privacy
Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.
Encoded an HS256 JWT with the supplied payload.
How it works
- Serialized the header (alg + typ) and the payload as compact JSON.
- Base64url-encoded both segments to form the signing input.
- Computed the HS256 signature over the signing input with the supplied secret.
- Joined the signing input and the base64url signature into the compact token.
- The secret stays in your browser; the token is built here and never sent.
Methodology
- Per RFC 7515, build the signing input as base64url(header) + '.' + base64url(payload) using the compact JSON serialization.
- Sign the signing input with HMAC-SHA-256/384/512 and the caller's secret, per RFC 7518.
- Encode the signature as base64url and append it to the signing input.
- On verification, recompute the signature and compare in constant time, then evaluate `exp` and `nbf` against the supplied reference time per RFC 7519.
Usage
- Choose encode or verify.
- To encode, paste a JSON payload object and the HMAC secret, then pick HS256, HS384 or HS512.
- To verify, paste the compact token and the secret; optionally supply a reference time to check exp and nbf.
Examples
These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.
The canonical HS256 example
{
"mode": "encode",
"algorithm": "sha256",
"payload": "{\"sub\":\"1234567890\",\"iat\":1516239022}",
"secret": "your-256-bit-secret"
}Verify that token
{
"mode": "verify",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwiaWF0IjoxNTE2MjM5MDIyfQ.L8i6g3PfcHlioHCCPURC9pmXT7gdJpx3kOoyAfNUwCc",
"secret": "your-256-bit-secret"
}Reject an expired token
{
"mode": "verify",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwiaWF0IjoxNTE2MjM5MDIyfQ.L8i6g3PfcHlioHCCPURC9pmXT7gdJpx3kOoyAfNUwCc",
"secret": "your-256-bit-secret",
"now": 4000000000
}Limitations
Signed is not encrypted
A JWT is a compact, URL-safe way to carry claims. Its payload is only base64url-encoded, so it is readable by anyone who holds the token. Signing proves integrity and origin, not confidentiality, and only when the verifier actually checks the signature and the intended algorithms.
Verify the algorithm, not just the signature
Classic JWT vulnerabilities come from accepting the algorithm named in the token. This tool accepts only the HMAC family and rejects `alg: none`; a production server should likewise pin the allowed algorithms and keys.
Frequently asked questions
- Is a JWT encrypted?
- No. A JWS (the usual 'JWT') is signed, not encrypted: anyone can read the header and payload. Never put a secret in the payload. Confidentiality needs JWE, which this tool does not implement.
- Why does my RS256 token not verify?
- Asymmetric signatures require a public or private key and the RSA/ECDSA primitives. This browser tool implements HMAC verification only, and states that limit instead of pretending to handle public-key tokens.
- Does the secret leave my browser?
- No. Signing and verification run locally with the bundled HMAC core. The page has no network or storage path.
Sources
Send feedback
Tell us if this tool helped, report a problem, or suggest a tool. Only the message you type is sent — never the input you used in the tool.
Was this tool useful?
Prefer to write to us directly? See the contact page.