Free online tools
English EN, Choose a language

JWT decoder

Paste a JSON Web Token to read its header and payload, with expiry and issue times as dates. Nothing is sent anywhere.

Result

Paste a token and the decoded header, payload and claims appear here.

    Decoded in your browser. The token is never uploaded or stored.

    How to decode a JWT

    1. Paste the token into the box. A leading Bearer from an Authorization header is removed for you, and line breaks are ignored.
    2. Read the Header (algorithm and type) and the Payload (the claims) as formatted JSON. Times such as exp are shown as UTC dates, with how long ago or how long from now they are.
    3. Copy any part with its own button.

    The signature is shown but not verified. Verifying needs the secret (HS256) or the public key (RS256, ES256), and this page never asks for either. Treat decoded claims as unverified information: a decoder proves nothing about who issued the token.

    What is inside a JWT

    A JSON Web Token (RFC 7519) is three Base64URL strings joined by dots: header.payload.signature. Decoding the first two gives JSON. The widely used example token from the specification world decodes like this:

    eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c

    Header:

    {
      "alg": "HS256",
      "typ": "JWT"
    }

    Payload:

    {
      "sub": "1234567890",
      "name": "John Doe",
      "iat": 1516239022
    }

    Base64URL is plain Base64 with - and _ and no padding, so the first two parts are readable by anyone. A JWT is signed, not encrypted: never put a password, a card number or another secret in the payload.

    Standard claims you will meet

    ClaimMeaningFormat
    issIssuer: who created the tokenstring or URL
    subSubject: who the token is about, often a user idstring
    audAudience: who should accept itstring or list
    expExpiration time: reject the token after thisUnix seconds
    nbfNot before: reject the token until thisUnix seconds
    iatIssued atUnix seconds
    jtiUnique token id, used to block replaysstring

    The three time claims are numbers of seconds since 1 January 1970 UTC. The decoder converts them: the example above was issued at 1516239022, which is Jan 18, 2018, 1:30:22 AM UTC. To convert any other number use the epoch converter.

    Common reasons a token is rejected

    An unsigned token, for example alg: none, decodes to: { "alg": "none" }

    Is it safe to paste a token here?

    The decoding runs in your browser and nothing is sent to a server or stored. Even so, a live token is a credential: anyone who has it can use it until it expires. Prefer tokens from a test environment, and revoke or let expire any production token you pasted into a shared screen or a chat. To check the JSON inside, use the JSON formatter; to decode a single Base64URL part by hand use Base64 decode with the URL-safe text pasted as is.

    Related tools

    JWT decoder FAQ

    How do I decode a JWT?

    Paste the token into the box. The header and payload appear as formatted JSON, with expiry and issue times as dates. Everything is decoded in your browser.

    Does this verify the signature?

    No. Verifying needs the secret or the public key. The signature is shown but not checked, so treat the decoded claims as unverified.

    Is it safe to paste my JWT?

    The token is decoded in your browser and never sent anywhere. A live token is still a credential, so prefer test tokens and do not share production tokens.

    What does exp mean in a JWT?

    exp is the expiration time as seconds since 1 January 1970 UTC. After it, a server should reject the token. The decoder shows it as a date and says if the token has expired.

    Why does it say my token has only two parts?

    A JWT needs three parts separated by dots. An opaque token or a truncated paste has fewer, and cannot be decoded.

    Is the payload of a JWT encrypted?

    Not in a normal signed JWT. The payload is only Base64URL encoded, so anyone with the token can read it. Do not put secrets in it.

    What is alg none?

    It means the token has no signature. A server that accepts such tokens can be tricked into trusting forged claims, so it should reject them.

    Missing something in the JWT decoder?Suggest an idea. It takes 20 seconds and we read every one.Suggest an idea

    Sends only what you type here, never the text you work with. Your email is used only to reply about this idea.

    Free online tools