JWT Decoder

Decode JSON Web Tokens securely in your browser.

100% Private: Your data never leaves your device. Processed locally in your browser.

How to Use

  1. Paste your encoded JSON Web Token (JWT) into the input box.
  2. The tool automatically splits the token at the '.' period delimiters.
  3. Inspect the decoded Header (algorithm and key ID) and Payload (user claims and expiry).
  4. Check timestamps: 'exp' (expiration) and 'iat' (issued at) are decoded into human-readable dates.

Complete Guide to JSON Web Tokens (JWT) & Security

1. Anatomy of a JSON Web Token (RFC 7519)

A JSON Web Token (JWT) is an open industry standard (RFC 7519) that defines a compact, self-contained way for securely transmitting information between parties as a JSON object. A JWT consists of three parts separated by dots (.):

Header . Payload . Signature
eyJhbGciOi... . eyJzdWIiOi... . SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
  • Header: Specifies the cryptographic algorithm (e.g., HS256, RS256, ES256) and token type.
  • Payload: Contains the claims—statements about an entity (typically, the user) and metadata such as expiration.
  • Signature: Cryptographic hash ensuring that the sender is who it says it is and that the payload was not tampered with in transit.

2. Why Client-Side In-Browser Decoding is Critical

Bearer tokens grant full authentication access to your backend API, microservices, and databases. Pasting production JWTs into arbitrary third-party web tools sends your secret bearer tokens across the internet, where server logs, third-party analytics scripts, and rogue proxies can intercept them.

FastUtilz decodes tokens entirely inside your local browser tab. The decoding logic uses native Base64Url string parsing without executing any network requests.

3. Standard Registered Claims Checklist

RFC 7519 defines several standard registered claims that every secure backend should validate:

  • exp (Expiration Time): Unix epoch timestamp after which the token is strictly invalid.
  • nbf (Not Before): Unix timestamp before which the token must not be accepted.
  • iat (Issued At): When the token was originally generated.
  • iss (Issuer): Identifies the authorization server that minted the token (e.g., Auth0, Firebase, Keycloak).
  • sub (Subject): The unique user ID or system service account.

4. Critical JWT Security Pitfalls in Production

  • Storing in localStorage: Sensitive JWTs in localStorage are vulnerable to Cross-Site Scripting (XSS). Store tokens in HttpOnly, Secure, SameSite=Strict cookies whenever possible.
  • Weak HMAC Secrets: HS256 tokens signed with short secrets (like "secret123") can be cracked offline in seconds using tools like Hashcat. Always use cryptographically secure 256-bit+ random keys.
  • Algorithm Confusion: If your server supports both asymmetric (RS256) and symmetric (HS256) keys, ensure attackers cannot force HMAC verification using the public RSA key as the secret.

Frequently Asked Questions

Is it safe to decode production JWT bearer tokens with this tool?

Yes, absolutely. FastUtilz executes all token decoding 100% locally in your web browser. Your authorization tokens, user IDs, corporate roles, and claims are never transmitted across the network or logged to any server.

What is the difference between decoding and verifying a JWT?

Decoding merely unpacks the Base64Url encoded Header and Payload JSON strings so humans can inspect claims. Verification mathematically checks the cryptographic signature using a secret key or public RSA/ECDSA key to prove the token has not been tampered with.

What is Base64Url encoding, and why does JWT use it?

Base64Url replaces the '+' and '/' characters from standard Base64 with '-' and '_', and removes trailing '=' padding. This ensures tokens can be safely embedded in HTTP Authorization headers, cookies, and URL query strings without URL-encoding.

What are the standard registered JWT claims (iss, sub, exp, iat)?

Common RFC 7519 registered claims include: 'iss' (issuer of the token), 'sub' (subject/user ID), 'aud' (intended audience), 'exp' (expiration Unix timestamp), 'nbf' (not before timestamp), and 'iat' (issued at timestamp).

What is the 'alg: none' vulnerability in JWTs?

The 'alg: none' flaw is a classic authentication bypass where an attacker modifies the header to specify no cryptographic algorithm and strips the signature. Flawed server libraries accept the unsigned token as valid unless explicitly configured to reject 'none'.

How can I decode a JWT payload in JavaScript without libraries?

In modern JavaScript: const payload = JSON.parse(atob(token.split('.')[1].replace(/-/g, '+').replace(/_/g, '/'))); This converts Base64Url back to Base64 and parses the claims instantly.