Skip to main content

    JWT Decoder

    Decode and inspect JSON Web Tokens. View header, payload, and expiration status. 100% client-side.

    No signup. 100% private. Processed in your browser.

    Paste JWT Token

    What Is a JWT and Why Should You Care?

    A JSON Web Token (JWT) is a compact, URL-safe way of representing claims between two parties. In plain English: it's how most modern web apps handle authentication. When you log in, the server creates a JWT containing your identity and permissions, signs it cryptographically, and hands it back. Every subsequent request includes that token to prove who you are.

    A JWT has three parts separated by dots: header.payload.signature. The header tells you the algorithm used. The payload contains the actual claims (user ID, roles, expiration). The signature ensures nobody has tampered with the first two parts.

    This decoder splits the token and shows you the header and payload in readable JSON. It runs entirely in your browser — your tokens never leave your device. Perfect for debugging auth issues during development.

    JWT Structure Explained

    PartEncodingContainsExample Fields
    HeaderBase64URLToken metadataalg (algorithm), typ (type)
    PayloadBase64URLClaims (data)sub (subject), exp (expiry), iat (issued at)
    SignatureBinaryVerification hashHMAC-SHA256 or RSA-SHA256 output

    What this means for you: The header and payload are just Base64URL-encoded JSON — anyone can read them. The signature is the only part that provides security. Never put sensitive data (passwords, credit card numbers) in a JWT payload.

    Standard JWT Claims

    ClaimFull NamePurpose
    issIssuerWho created the token (e.g., auth.myapp.com)
    subSubjectWho the token identifies (usually user ID)
    audAudienceWho should accept this token (e.g., api.myapp.com)
    expExpirationUnix timestamp when the token expires
    iatIssued AtUnix timestamp when the token was created
    nbfNot BeforeToken is invalid before this time
    jtiJWT IDUnique identifier to prevent replay attacks

    Common JWT Debugging Tips

    Token expired?

    Check the "exp" claim. It's a Unix timestamp — convert it to a human-readable date to see when it expired. If your app gets 401 errors after a while, the token lifetime is likely too short.

    Wrong permissions?

    Look for "roles", "scope", or custom claims in the payload. If a user can't access a resource, their token might be missing the required role or scope claim.

    Signature invalid?

    The server's signing key might have rotated, or the token was modified in transit. This decoder doesn't verify signatures — it just reads the payload. Use server-side verification for security.

    Never store JWTs in localStorage

    localStorage is vulnerable to XSS attacks. Use HttpOnly cookies for auth tokens in production. Session storage is slightly better but still accessible to scripts on the same page.

    JWT vs Session Cookies

    FeatureJWT (Stateless)Session Cookie (Stateful)
    Server storageNone — token is self-containedSession store (Redis, DB)
    ScalabilityEasy — any server can verifyNeeds shared session store
    RevocationHard — token valid until expiryEasy — delete from store
    Size~800 bytes typical~32 byte session ID
    Best forAPIs, microservices, mobileTraditional web apps, SPAs

    What this means for you: JWTs shine in distributed systems where multiple services need to verify identity without sharing a database. Session cookies are simpler and more secure for single-server web apps because you can revoke them instantly.

    Related Tools

    How to use this tool

    1

    Paste your JWT token into the input field

    2

    Click Decode to view the header and payload

    3

    Check the expiration status and claim values

    Common uses

    • Debugging authentication issues in web apps
    • Inspecting token claims and permissions
    • Checking token expiration during development
    • Verifying JWT structure before API calls
    • Understanding OAuth2 and OIDC token contents

    Share this tool

    Frequently Asked Questions