JWT Decoder & Encoder
Decode any JWT, verify its HS256/384/512 signature, create your own signed tokens — even decode single-payload tokens. 100% in your browser.
"none" tokens are never safe in production — anyone can forge them. Your secret is used only inside your browser and never leaves your device.
What is a JWT decoder?
A JSON Web Token (JWT) is three Base64URL-encoded parts joined by dots: a header (algorithm and token type), a payload (claims like user id and expiry), and a signature. Servers pass JWTs around for authentication, and when something goes wrong — an expired session, a wrong role, a clock-skew rejection — the fastest diagnosis is to look inside the token. This tool splits the parts, decodes the header and payload into readable JSON, translates the exp, iat, and nbf timestamp claims into human dates with plain-English validity notes, verifies HS256/384/512 signatures with your secret, and can even generate fresh signed tokens in the Create tab.
How to Use the JWT Decoder Online
- Paste the full JWT (header.payload.signature) — or a single base64 payload token — into the box. It decodes automatically as you type.
- Read the header and payload as pretty-printed JSON, with one-click copy.
- Check the time-claims card: expiry date, whether the token is expired, when it was issued, and whether it is not yet valid.
- Paste your HMAC secret in the signature section to verify HS256 / HS384 / HS512 signatures — or switch to the Create tab to build your own signed token.
JWT Decoder — Key Features
- Correct Base64URL decoding with padding repair and UTF-8 support for non-ASCII claims.
- Auto-detects token type: standard 3-part JWTs and single base64 payload tokens (like compact session tokens some services issue).
- Cryptographic signature verification for HS256, HS384 and HS512 with your secret — entirely in your browser.
- Built-in JWT encoder: edit header and payload JSON, pick HS256/384/512 or none, sign with your secret, and copy the finished token.
- Automatic exp / iat / nbf conversion to local dates plus relative times ("expired 2 days ago"), with EXPIRED / valid / not-yet-valid annotations and a millisecond-timestamp bug detector.
- Shareable decode links, JSON download, copy buttons, and "none"-algorithm forgery warnings.
- Graceful errors for truncated tokens, non-JSON parts, and malformed Base64URL.
JWT Decoder — Common Use Cases
- Debugging "unauthorized" errors: checking whether the token actually expired or was tampered with.
- Auth development: verifying the claims your login endpoint puts into tokens, and testing that your server accepts the signatures.
- Role issues: confirming the roles or scopes claim contains what the API expects.
- Clock skew: comparing iat/exp against your machine's time when tokens are rejected.
- Prototyping: minting test tokens with custom claims in the Create tab instead of writing a script.
- Learning: seeing the real structure of the tokens tutorials talk about.
JWT Decoder — Practical Tips
- Never paste a production token with real privileges into any online tool — the payload is only Base64-encoded, not encrypted, so anyone can read it.
- A decoded token tells you nothing about authenticity; only cryptographic signature verification with the issuer's secret or public key does that.
- exp is in seconds since epoch, not milliseconds — a 13-digit "expiry" is a bug in whatever issued the token (this tool flags it).
- If a token is valid but rejected, check nbf (not-before) and your server's clock before anything else.
- Keep tokens out of URLs where possible — they leak into logs and browser history. Share links are convenient for debugging; revoke the token afterwards.