JWT Decoder - Decode JWT Online (Free, Private, Browser-Based)
What This Tool Does
This JWT decoder parses JSON Web Tokens and displays the decoded header and payload sections. It highlights important claims (iss, sub, aud, exp, iat, nbf), converts timestamps to human-readable dates, and flags expired tokens. Decoding happens entirely in your browser — your tokens never leave your device.
Inputs Explained
- JWT Token: Paste a full JWT token (three Base64URL sections separated by dots).
How It Works
A JWT has three parts separated by dots: header.payload.signature. The first two are URL-safe Base64 encoded JSON. The tool splits on dots, Base64URL-decodes each section, and parses the resulting JSON to display cleanly. The signature is NOT verified (that would require the secret key).
Formula / Logic Used
Paste any JWT token and instantly see its header, payload, and claim details.
Step-by-Step Example
Token: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMjMiLCJuYW1lIjoiUmFtZXNoIn0.sig
Header: {"alg":"HS256"}
Payload: {"sub":"123","name":"Ramesh"}
The signature section is shown as-is — this tool does not verify signatures. For that, you need the secret key and a proper JWT library.
Use Cases
- API debugging: Inspect tokens returned by your auth endpoint to verify claims are correct.
- Token expiry checks: See when a token expires and when it was issued in human-readable format.
- Claim inspection: View custom claims (user roles, permissions) inside access tokens.
- Learning JWT structure: Understand the three-part format and how claims are encoded.
- Integration testing: Confirm your backend is issuing the correct audience, issuer, and expiry values.
Assumptions and Limitations
- This tool only DECODES the JWT — it does NOT verify the signature. Anyone can create a JWT with arbitrary content.
- Signature verification requires the secret key (HMAC) or public key (RSA/ECDSA) and is intentionally not supported to avoid key handling.
- JWE (encrypted JWT) tokens are not supported — this tool handles JWS (signed) tokens only.
- Expiry check uses your local system clock; ensure it is correct for accurate results.
JWT Decode - Paste and Inspect
Paste a token into this JWT decoder to inspect the header and payload. The JWT decode step splits the token by dots, Base64URL-decodes the first two parts, and shows the JSON in a readable format. It is useful as a JWT parser and JWT token decoder for debugging.
What is a JSON Web Token?
A JSON Web Token is a compact string used to carry claims between systems. A normal signed JWT has three parts: header.payload.signature.
JWT Parser and Inspector
The parser reads the token structure and formats the claims, but it does not prove the token is trusted. Use it to inspect data, not to authorize a user.
Common JWT Claims
- iss: issuer.
- sub: subject, often a user ID.
- aud: audience.
- exp: expiration time.
- iat: issued-at time.
- nbf: not-before time.
- jti: JWT ID.
JWT Token Decoder vs Verifier
A decoder reads the token. A verifier checks the signature with the correct key and validates claims such as exp, iss, and aud. For security decisions, verification must happen on the server.
Related tools
Frequently Asked Questions
How do I decode a JWT?
Paste the token. The decoder splits it by dots, Base64URL-decodes the header and payload, and shows formatted JSON.
Is this JWT decoder safe?
The decoder runs in your browser. Still, avoid pasting live production tokens unless you are comfortable with the environment.
Does this tool verify JWT signatures?
No. It decodes and inspects the token. Signature verification requires the correct secret or public key.
What is a JWT parser?
A JWT parser reads the token parts and turns the encoded header and payload into readable JSON.
1: How long should a JWT access token last?
For access tokens, shorter is usually safer. Many production systems use lifetimes between 5 and 15 minutes, then rely on a refresh token or session flow to get a new access token. The right number depends on risk, user experience, and how quickly you can revoke compromised credentials. For admin panels, payments, or sensitive APIs, keep it short. For low-risk internal tools, you may allow a little longer. Do not make access tokens last for days unless you have a strong reason and a revocation strategy.
2: What are the three parts of a JWT (header, payload, signature)?
A JWT normally has three Base64URL-encoded parts separated by dots. The header describes the token type and signing algorithm. The payload contains claims, such as user ID, issuer, audience, and expiry time. The signature is created from the header and payload using a secret or private key, depending on the algorithm. Decoding the first two parts only reads the data; it does not prove the token is trusted. For security decisions, your server must verify the signature and validate important claims.
3: What is `iat`, `exp`, `nbf`, `sub`, `iss`, `aud` in JWT claims?
These are common registered JWT claims. iat means "issued at" and tells when the token was created. exp is the expiration time. nbf means "not before", so the token should not be accepted too early. sub is the subject, often the user ID. iss is the issuer, such as your auth server. aud is the audience, meaning who the token is intended for. A decoder can show these values, but your API should also validate them, especially exp, iss, and aud.
4: How do I check JWT expiration time?
Decode the JWT payload and look for the exp claim. It is usually a Unix timestamp in seconds, not milliseconds. Convert it to your local time or UTC, then compare it with the current time. If exp is earlier than now, the token is expired and should not be accepted. Be careful with clock differences between servers; many systems allow a small clock skew, such as 30 to 60 seconds. Also remember that reading exp is not enough for security; verify the token signature too.
5: What happens if my JWT secret is leaked?
If a symmetric JWT secret is leaked, an attacker may be able to create fake tokens that your server will accept. Treat it like a password breach for your authentication system. Rotate the secret immediately, invalidate tokens signed with the old secret, review logs, and check whether any admin or customer data was accessed. For future safety, store secrets in a secure secret manager, restrict who can read them, and avoid putting them in frontend code, Git repositories, screenshots, or support tickets.
6: Is it safe to decode a JWT online?
It depends on the tool and the token. Decoding a JWT only reveals the header and payload, and those parts are not encrypted by default. Still, payloads often contain user IDs, emails, roles, tenant IDs, or internal system names. On BulkCalculator, the JWT decoder is designed to run locally in the browser, which is better for privacy. Even so, avoid pasting live production tokens into any website unless you trust the environment. Never share tokens that still grant access to real systems.
7: How do I decode a JWT without a library?
Split the token by dots into header, payload, and signature. Take the first two parts, convert Base64URL to regular Base64 by replacing - with + and _ with /, add padding if needed, then Base64-decode and parse the result as JSON. That will let you read the header and claims. This does not verify the signature. For real authentication, use a trusted JWT library because verification includes algorithm checks, key handling, claim validation, clock skew, and security edge cases that are easy to get wrong manually.
8: Can I decode a JWT in JavaScript without external libraries?
Yes, for simple inspection you can decode the header and payload in JavaScript using atob after converting Base64URL characters. For Unicode-safe payloads, decode the bytes properly with TextDecoder rather than assuming plain ASCII. This is fine for debugging or showing token contents in a developer tool. It is not enough for login security. Browser-side decoding cannot safely prove a token is valid, because the server must verify the signature with the correct secret or public key and validate claims like exp and aud.
9: How do I read JWT claims without verifying the signature?
You can decode the payload part and parse it as JSON, which shows claims such as sub, email, roles, iss, aud, iat, and exp. This is useful for debugging, checking expiry, or understanding what an identity provider sent. But treat the result as untrusted until the signature is verified. Anyone can edit the payload and re-encode it. Your UI may read claims for display, but your backend should always verify the signature and important claims before granting access or making authorization decisions.
10: Why does my JWT decoder say "invalid token"?
A decoder usually says invalid token when the string is not in the expected JWT shape: three dot-separated parts for a signed JWS token. Common causes include copying only part of the token, adding "Bearer " at the beginning, missing dots, broken Base64URL characters, line breaks, or extra spaces. Another cause is an encrypted JWT, which has a different structure and cannot be read like a normal signed token. Start by trimming spaces, removing the Bearer prefix, and confirming the token has the correct number of sections.
Sources and References
- RFC 7519 — JSON Web Token (JWT) — Official JWT specification.
- RFC 7515 — JSON Web Signature (JWS) — JWT signing format specification.
- JWT.io — Official site for JWT learning and debugging.
- OWASP — JWT Cheat Sheet — Best practices for secure JWT usage.