Free JWT Decoder

Decode and inspect JSON Web Tokens · header, payload, claims and expiration.

Header


      

Payload


      

Signature


      

About JWTs

JSON Web Tokens (JWTs) are a compact way to represent claims between two parties. They consist of three parts: a header (algorithm and type), a payload (claims like issuer, expiration, subject), and a signature. This tool decodes the header and payload but does not verify signatures · for that, you need the signing secret or public key. All decoding happens in your browser; your token is never sent anywhere.

A Short History of JSON Web Tokens

The JSON Web Token (JWT) was standardised as RFC 7519 in May 2015 by Michael B. Jones (Microsoft), John Bradley (Ping Identity), and Nat Sakimura (NRI) under the IETF JOSE Working Group. It was the culmination of half a decade of work: the first JWT internet-draft appeared in December 2010, growing out of SAML 2.0 (2005)'s heavyweight XML-based assertion format and the felt need for something lighter that browsers could parse natively. The breakthrough was choosing JSON over XML and base64url over PEM: a JWT could fit in a URL query string or an Authorization: Bearer header. The whole JOSE family shipped as a coordinated set: RFC 7515 (JWS) for signing, RFC 7516 (JWE) for encryption, RFC 7517 (JWK) for the key format, RFC 7518 (JWA) for algorithm identifiers, and RFC 7519 (JWT) for the claims layer, all on the same day in May 2015. Adoption was instant. OAuth 2.0 (RFC 6749, 2012) had standardised access tokens but left their format opaque; the industry chose JWT. OpenID Connect (December 2014, OpenID Foundation) made JWT mandatory for ID tokens. By 2017 every major identity provider (Auth0, Okta, Azure AD, AWS Cognito, Google Identity, Firebase Auth) issued JWTs as their native session format. JWT.io, the decoder website that Auth0 launched in 2014, became the de facto JWT debugging tool and helped cement the format's developer mindshare. Two security incidents shaped the modern threat model: Tim McLean's 2015 disclosure of the alg: none bypass and the HS/RS algorithm-confusion attack, and CVE-2022-21449 (April 2022), Neil Madden's «Psychic Signatures» bug in Java 15-18's ECDSA verifier. Both led to library-default hardening: most modern libraries now refuse alg: none outright and pin the expected algorithm rather than reading it from the token header.

The Anatomy of a JWT

Where JWTs Are Used in Practice

Standards and Security Milestones

More frequently asked questions

Why does this tool not verify the signature?

Verification needs a secret (HMAC) or public key (RSA / ECDSA / EdDSA). Pasting a production HMAC secret into any website is a credential leak in itself, even on a tool that swears it does not transmit anything. Verification belongs on a server you control. The decoder's job is to make the contents readable so you can see what your verifier should be checking.

Is it safe to paste real production tokens here?

Decoding happens entirely in your browser. The token is not sent over the network, written to any log, or stored anywhere. That said, a JWT often is a credential: anyone holding an unexpired access token can act as the user. The community convention is «treat a production JWT like a session cookie»: prefer test tokens when you can, and rotate any real token you have shared anywhere outside the browser session that minted it.

Where should I store a JWT in the browser?

The two common patterns each have a tradeoff. localStorage is convenient but readable by any successful XSS attack on the page. Cookies with HttpOnly are invisible to JavaScript so XSS cannot read them, but they need SameSite=Strict or SameSite=Lax to avoid CSRF. The current best practice: short-lived access tokens in a JavaScript variable (memory only) plus a long-lived refresh token in an HttpOnly + Secure + SameSite=Strict cookie scoped to the refresh endpoint, rotated on every use.

What does the kid field in the header do?

It identifies which key signed the token. Modern identity providers publish their public keys at a /.well-known/jwks.json endpoint as a JWK Set (RFC 7517); the verifier looks up the key whose kid matches the token's header. This is what makes zero-downtime key rotation possible: both old and new keys can sit in the JWKS during the grace period.

Can I revoke a JWT once it has been issued?

Not natively. A signed JWT is valid until its exp claim; that statelessness is the format's headline property. Workarounds: keep access tokens short (5-15 minutes) paired with a revocable refresh token; maintain a server-side deny list of revoked jti values; rotate the signing key (which invalidates every outstanding token signed with it). Each option re-introduces some statefulness; that's the trade.

Is decoding a token the same as decrypting it?

No. Decoding reverses base64url back to JSON: anyone can do it, and that is the point. Decrypting requires a key and only applies to JSON Web Encryption (JWE, RFC 7516), which is the encrypted variant of the JOSE family. Most tokens you see in the wild are JWS (signed but not encrypted), so decoding is enough to read them.

Related Tools