UtilsDaily

JWT Decoder

Decode any JSON Web Token instantly โ€” header, payload, claims, and expiry.

What Is a JWT?

A JSON Web Token (JWT) is a compact, URL-safe method of representing claims between two parties. It is structured as three Base64URL-encoded sections joined by dots: header.payload.signature. JWTs are the most common format for authentication tokens in modern web APIs โ€” when you log in to a web app, you often receive a JWT that proves your identity for subsequent requests.

The header identifies the token type and signing algorithm. The payload contains claims (key-value pairs) about the subject โ€” typically user ID, roles, and expiry time. The signature ensures the token has not been tampered with.

How to Use This JWT Decoder

Paste any JWT into the input box. The decoder splits the token at the dots, Base64URL-decodes each section, and displays formatted JSON for the header and payload. If the payload contains an exp (expiration) claim, an indicator shows whether the token is currently valid or expired. Timestamp claims (iat, exp, nbf) are automatically displayed as human-readable dates.

JWT Structure Explained

Header

The header is a JSON object identifying the token type (typ) and the cryptographic algorithm used to sign it (alg). Common algorithms: HS256 (HMAC-SHA256), RS256 (RSA-SHA256), ES256 (ECDSA-SHA256).

Payload (Claims)

The payload contains registered standard claims and custom application claims:

  • sub โ€” Subject: the entity the token is about (usually a user ID)
  • iss โ€” Issuer: who created the token
  • aud โ€” Audience: who the token is intended for
  • exp โ€” Expiration: Unix timestamp when the token expires
  • iat โ€” Issued At: when the token was created
  • nbf โ€” Not Before: earliest time the token is valid

Signature

The signature is a cryptographic hash of the header and payload. It prevents tampering โ€” any change to the header or payload invalidates the signature. Verifying a signature requires the secret key or public key, which this client-side tool does not perform.

Security Notes

  • JWTs are not encrypted by default โ€” the payload is only Base64URL-encoded and readable by anyone. Never put passwords, credit card numbers, or other secrets in a JWT payload.
  • Always verify signatures on the server side before trusting a JWT's claims.
  • Check expiry โ€” expired tokens should be rejected even if the signature is valid.

Frequently Asked Questions

What is a JWT?

A JWT (JSON Web Token) is a compact token with three dot-separated sections: header, payload, and signature. It is used for authentication โ€” after login, a server issues a JWT that the client sends with subsequent requests to prove identity. The server validates the signature to trust the claims.

Is it safe to decode a JWT here?

Yes. All decoding happens in your browser โ€” nothing is sent to a server. The token never leaves your device. For production systems, avoid pasting tokens containing real user PII in any third-party tool.

What do exp, iat, and nbf mean?

exp = expiration time (Unix timestamp). iat = issued at time. nbf = not before time. All three are standard registered claims in RFC 7519. The decoder displays them as human-readable dates automatically.

Can this verify the JWT signature?

No โ€” signature verification requires the signing key, which only the server knows. This tool decodes the header and payload only. To verify signatures, use a backend JWT library or jwt.io with your key.

What is Base64URL encoding?

Base64URL is a URL-safe variant of Base64 that replaces + with - and / with _, and omits padding (=). JWT sections start with eyJ because { in Base64URL always begins with those characters.

Embed This Tool on Your Website

โ–ผ