Decoded output appears here
Paste a JWT on the left to instantly inspect its header, payload and signature, analyze expiry and run a full security audit.
Loading…
Paste a JWT on the left to instantly inspect its header, payload and signature, analyze expiry and run a full security audit.
Decode, inspect, validate, verify, sign, compare and audit JSON Web Tokens — all locally, with real cryptography. This toolkit performs genuine signature verification and signing via the browser’s Web Crypto API across HS256/384/512, RS256/384/512, PS256/384/512, ES256/384/512 and EdDSA, and grades every token against modern best practices. Your tokens, secrets and keys never leave your device.
Paste a token and see the header, payload and signature decoded in real time, with a colour-coded segment map and one-click copy/download for every part. Handles JWS, unsecured tokens and detects JWE.
Cryptographically verify HS256/384/512, RS256/384/512, PS256/384/512, ES256/384/512 and EdDSA using the browser’s Web Crypto API. Import a shared secret, a PEM public key, an X.509 certificate or a JWK.
Build a token from scratch with a header and payload editor, then sign it with your secret or private key. No keys handy? Generate a fresh RSA, EC or Ed25519 key pair in one click and export it as PEM or JWK.
A visual timeline of iat → nbf → exp with the exact time remaining or time since expiry, lifetime, and clock-skew warnings — so you can see at a glance whether a token is active, not-yet-valid or expired.
Every token is scored 0–100 against RFC 8725 best practices. The auditor detects “alg:none”, algorithm-confusion risks, missing/over-long expiry, missing audience/issuer and secrets accidentally placed in the payload.
For HMAC tokens, run a dictionary of common weak secrets entirely in your browser to find out if the signing key is guessable — the same defensive check pentesters use, with zero data leaving the page.
Diff two tokens side by side and instantly see which header parameters and claims were added, removed or changed — perfect for debugging refresh flows and configuration drift.
Paste or upload many tokens at once to get a table of algorithm, subject, issuer and expiry status for each, then export the results as JSON or CSV for audits and reports.
All decoding, verifying and signing happens locally with Web Crypto and pure JavaScript. Your tokens, secrets and keys are never transmitted, logged or stored, and a one-click privacy wipe clears everything from memory.
Get ready-to-use Authorization headers and verification snippets for cURL, Node.js, Python, Java, Go, PHP and C# so you can move from debugging to integrating in seconds.
A polished workspace with a built-in dark/light toggle that works beautifully on phones, tablets and desktops, with accessible keyboard navigation and screen-reader labels throughout.
Learn how JWTs actually work — claims, signatures, JWT vs sessions, OAuth2/OIDC, and security and expiration best practices — without leaving the tool.
Paste a JSON Web Token into the input panel, drop a .txt/.jwt file, or paste straight from an Authorization header — the “Bearer ” prefix is stripped automatically. Decoding starts the instant a token is detected; nothing is uploaded.
The token is split into its three base64url segments and decoded live. The colour-coded structure view, header inspector and payload inspector show every claim with plain-English explanations, while the signature segment is shown byte-for-byte.
The expiration analyzer shows issued-at, not-before and expiry on a visual timeline with the exact time remaining. The security auditor scores the token 0–100, flagging “alg:none”, weak secrets, missing exp/aud/iss, over-long lifetimes and sensitive data in the payload.
Switch to Verify and paste a shared secret, public key (PEM/JWK) or certificate to cryptographically confirm the signature. Or open Generate to build and sign a brand-new token — including generating a fresh RSA/EC/EdDSA key pair right in the browser.
A signed JWT is three base64url segments joined by dots: header.payload.signature. Click any segment in the tool above to jump straight to it.
Base64url JSON · algorithm & type
{ "alg": "HS256", "typ": "JWT" }Base64url JSON · the claims
{ "sub": "1234", "exp": 1716242622 }Signed bytes of header.payload
HMACSHA256( base64url(header) + "." + base64url(payload), secret )| Claim | Name | Purpose | Required | Example |
|---|---|---|---|---|
| iss | Issuer | Identifies who issued the token; verifiers check it against a trusted list. | Recommended | "iss": "https://auth.example.com" |
| sub | Subject | The principal the token is about — usually a stable, unique user/client ID. | Recommended | "sub": "1234567890" |
| aud | Audience | Who the token is intended for; recipients must reject tokens not meant for them. | Recommended | "aud": "my-api" |
| exp | Expiration Time | After this NumericDate the token must be rejected. | Strongly recommended | "exp": 1735689600 |
| nbf | Not Before | The token must not be accepted before this NumericDate. | Optional | "nbf": 1735686000 |
| iat | Issued At | When the token was issued; used for age and max-age checks. | Recommended | "iat": 1735686000 |
| jti | JWT ID | A unique token ID enabling replay detection and revocation. | Optional | "jti": "a1b2c3d4" |
| Algorithm | Type | Security | Performance | Recommended use |
|---|---|---|---|---|
| HS256 | Symmetric (HMAC + SHA-256) | Strong | Very fast | Internal services that already share a secret. Use a 256-bit random key. |
| HS384 | Symmetric (HMAC + SHA-384) | Strong | Very fast | Same as HS256 with a larger digest. |
| HS512 | Symmetric (HMAC + SHA-512) | Very strong | Very fast | High-assurance internal signing with a strong shared secret. |
| RS256 | Asymmetric (RSA PKCS#1 v1.5) | Strong | Moderate | The OIDC default for public APIs — verifiers only need the public key. |
| RS384 / RS512 | Asymmetric (RSA PKCS#1 v1.5) | Strong | Moderate | RSA deployments wanting a larger SHA-2 digest. |
| PS256 | Asymmetric (RSA-PSS) | Very strong | Moderate | New RSA deployments — PSS has stronger security proofs than RS256. |
| ES256 | Asymmetric (ECDSA P-256) | Very strong | Fast | Modern APIs. Compact tokens; faster than RSA at equivalent security. |
| ES384 / ES512 | Asymmetric (ECDSA P-384/P-521) | Very strong | Fast | Higher-assurance elliptic-curve signing. |
| EdDSA | Asymmetric (Ed25519) | Very strong | Fast | State-of-the-art: deterministic, fast and misuse-resistant where supported. |
| none | Unsecured | Insecure | — | Never use in production. Servers must reject "alg":"none". |
A JSON Web Token (JWT, pronounced “jot”) is a compact, URL-safe way to represent claims — pieces of information — that are transferred between two parties. Defined in RFC 7519, a JWT packages a JSON payload together with a header and a cryptographic signature so the receiver can verify that the data is authentic and has not been tampered with.
In its most common form, a signed JWT (technically a JWS) is three base64url-encoded segments joined by dots: header.payload.signature. The header says which algorithm secured the token, the payload carries the claims, and the signature lets anyone with the right key confirm the token’s integrity. Because the result is a short, text-only string, a JWT travels comfortably in an HTTP Authorization header, a cookie or a URL.
JWTs are the backbone of modern stateless authentication and authorization. They are issued by identity providers such as Auth0, Okta, Microsoft Entra ID, Google and Keycloak, and consumed by APIs, single-page apps and microservices the world over as part of OAuth 2.0 and OpenID Connect.
The header is a small JSON object that declares the token type ("typ":"JWT") and the signing algorithm ("alg", e.g. RS256 or HS256). It may also carry a key ID ("kid") so the verifier knows which key to use.
The payload (also called the claims set) is a JSON object of statements about the subject — for example who they are (sub), who issued the token (iss), who it is for (aud) and when it expires (exp). Crucially, in a signed JWT the payload is only base64url-encoded, not encrypted: anyone holding the token can read it. Never put secrets or sensitive personal data in a JWS payload.
The signature is created by signing the string header.payload with a key, using the algorithm named in the header. For HMAC algorithms the same secret signs and verifies; for RSA, ECDSA and EdDSA a private key signs and the matching public key verifies. If even a single byte of the header or payload changes, the signature no longer matches and the token is rejected.
Traditional session authentication stores a session record on the server and gives the client an opaque session ID in a cookie. Every request, the server looks up that ID to find the user. This is simple and easy to revoke, but it requires shared session storage and a lookup on every request.
JWTs are self-contained: the user’s identity and permissions live inside the signed token, so an API can authenticate a request just by verifying the signature — no database lookup, no shared session store. That statelessness is what makes JWTs scale so well across microservices and serverless functions.
The trade-off is revocation. Because a JWT is valid until it expires, you cannot instantly “log out” a leaked token without extra machinery (short lifetimes, a token blocklist keyed on jti, or rotating signing keys). The usual pattern is short-lived access tokens plus a longer-lived refresh token managed server-side.
In OpenID Connect, an ID token is a JWT that proves a user authenticated and carries profile claims such as name and email. In OAuth 2.0, an access token (often a JWT) authorizes a client to call an API on the user’s behalf, with permissions expressed as scopes (scope/scp) or roles.
A typical flow: the user signs in at an identity provider, which issues a signed JWT; the client sends it on each API call as Authorization: Bearer <token>; the API verifies the signature against the provider’s published public keys (a JWKS), checks the issuer, audience and expiry, and then reads the claims to make an access decision.
Because verification only needs the public key, asymmetric algorithms (RS256, ES256, EdDSA) are the standard choice for public APIs — the API never holds a secret that could mint tokens.
The signature is what makes a JWT trustworthy. It is a Message Authentication Code (for HMAC) or a digital signature (for RSA/ECDSA/EdDSA) over the exact bytes of header.payload. Verifying it tells the recipient two things: the token was produced by someone holding the signing key, and it has not been altered in transit.
Symmetric (HMAC) signatures use a single shared secret for both signing and verifying — fast and simple, but every verifier can also forge tokens, so they suit closed, internal systems. Asymmetric signatures split the key in two: the issuer keeps a private signing key, and verifiers only ever see the public key, which cannot create tokens.
This tool performs real verification using the Web Crypto API. Paste the matching secret or public key and the toolkit will tell you definitively whether the signature is valid — the same check your server should perform on every request.
Always pin the algorithm. Decide server-side which algorithms you accept and reject everything else — never trust the token’s own "alg" header. This blocks the classic “alg:none” forgery and RS256→HS256 algorithm-confusion attacks.
Verify the signature, then the claims. Confirm the signature with a key from a trusted, pinned source (your JWKS), then validate iss, aud, exp and nbf. Reject tokens whose audience or issuer you do not recognise.
Keep payloads minimal and non-secret. A JWS payload is readable by anyone holding the token, so never include passwords, card numbers, private keys or sensitive PII. Use strong, random secrets (≥256-bit) for HMAC and rotate keys regularly.
Use short lifetimes and plan for revocation. Short exp values limit the damage of a leak; pair them with refresh tokens and, where needed, a jti blocklist so individual tokens can be revoked.
Set an exp on every token. A token without an expiration is valid forever and is one of the most common and dangerous JWT mistakes. Encode exp as a NumericDate — seconds since the Unix epoch, not milliseconds and not a string.
Right-size the lifetime. Access tokens are typically valid for 5–60 minutes; longer-lived sessions are handled with refresh tokens rather than long-lived access tokens. Include iat so consumers can enforce a maximum age, and use nbf if a token should only become valid in the future.
Allow a small clock-skew tolerance (a minute or two) when validating exp and nbf to absorb differences between server clocks, but no more — large tolerances weaken the guarantees that expiry is meant to provide.
Send a token as a Bearer header, then verify it server-side with a pinned algorithm. Copy-paste snippets for the most popular stacks:
Decode the token your IdP returned to confirm the right claims, scopes and audience are present before you ship.
Confirm a token was really signed by the expected key without writing throwaway scripts or exposing secrets.
See exactly when a token was issued and when it expires to track down “401 Unauthorized” and clock-skew bugs.
Catch “alg:none”, missing expiry, over-long lifetimes and PII in the payload during code review and pentests.
Generate signed tokens with custom claims to exercise your API’s authorization logic and edge cases.
A hands-on way to understand headers, claims and signatures for onboarding, workshops and interviews.