JWT Decoder & Security Auditor

Decode and inspect JSON Web Tokens with client-side security checks for none algorithm, expiry, audience, issuer, and risky claim setups.

Security score

64

Needs review

This is a fast client-side audit. It helps surface risky token configurations before you trust or ship them.

Security findings

对称签名算法需要重点保护密钥

warning

HS 系列算法安全性依赖共享密钥强度与保密性,弱密钥或泄漏会直接失守。

Recommendation: 使用高熵随机密钥,并限制签发方数量;如需多方校验可考虑 RS/ES 系列。

Token 已过期

warning

当前 `exp` 早于现在,继续使用该 token 会被安全实现拒绝。

Recommendation: 重新签发 token,并检查客户端是否错误缓存旧凭证。

Header
{
  "alg": "HS256",
  "typ": "JWT",
  "kid": "demo-key-1"
}
Payload
{
  "sub": "1234567890",
  "iss": "devhelper.tools",
  "aud": "api-client",
  "name": "John Doe",
  "iat": 1719571200,
  "exp": 1719657600
}
Signature
SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Standard Claims
iss (Issuer) devhelper.tools
sub (Subject) 1234567890
aud (Audience) api-client
iat (Issued At) 6/28/2024, 10:40:00 AM
exp (Expires At) 6/29/2024, 10:40:00 AM Expired
This tool only decodes the token and performs heuristic auditing. It does NOT verify the signature. Never trust unverified JWT contents in production.

Decode and inspect JWT tokens to debug authentication flows

JSON Web Tokens are the de-facto standard for stateless authentication and authorization. They look like opaque strings, but they actually carry a Base64-encoded header, payload, and signature. This page splits a JWT into its parts so you can inspect the algorithm, claims, expiration, issuer, and audience without writing throwaway code. Decoding happens entirely in your browser, which matters because tokens often grant real access and should never be pasted into untrusted services.

  1. Paste the full JWT, including the two dots that separate header, payload, and signature.
  2. Read the decoded header to confirm the signing algorithm (HS256, RS256, ES256, etc.) is the one your service expects.
  3. Inspect the payload claims, especially `iss`, `aud`, `sub`, `exp`, `iat`, and `nbf`, against the values your application enforces.
  4. Use the timestamp tool to translate `exp` and `iat` into human-readable dates if you need to verify expiry behavior.

What JWTs are good at and where they hurt

JWTs are useful when signed claims need to travel across services without shared session state. They work well for user identity, roles, tenant context, expiry, audience, and issuer metadata that intermediaries can validate consistently.

They are not a free win for every auth design. Tokens are harder to revoke than server-side sessions, oversized claims bloat requests, and weak validation rules create subtle security gaps. Evaluate those tradeoffs before choosing JWTs rather than treating token decoding as a complete authentication design.

Decoding is not validation

Reading the header and payload only tells you the token is structurally decodable. It does not prove the signature is valid, the algorithm is acceptable, the issuer is trusted, or the token is still active. Real validation also checks `iss`, `aud`, `exp`, `nbf`, and often key selection and rotation.

That distinction matters because many teams accidentally trust decoded payloads before signature verification. Treat every decoded claim as untrusted until the complete validation policy succeeds.

Best use cases

  • Debugging why a backend rejects a token returned by an identity provider.
  • Auditing third-party JWTs to understand which claims your code is relying on.
  • Inspecting test tokens during integration work without exposing them to external services.

Common mistakes to avoid

  • JWTs are signed, not encrypted by default. Anyone who has the token can read every claim inside it.
  • Decoding does not verify the signature. A successful decode tells you nothing about whether the token is genuine.
  • Long-lived tokens with sensitive claims are dangerous. Treat JWTs as bearer credentials and rotate them aggressively.

How this tool works

Implementation
Base64url decoding and JSON parsing implemented in TypeScript
Data path
Input is processed in the current browser tab. Tool input is not submitted to a DevHelper Tools application server.
Independent check
Decoding is not verification. Validate the signature, algorithm, issuer, audience, expiry, and nonce in a trusted JWT library.

Verify before production use

A successful conversion or generated snippet is not proof that it matches your runtime. Check the output against an independent implementation, test one known edge case, and record the environment or standard version you validated.

FAQ

Does this tool verify the signature?

No. It decodes the token so you can read the claims, but signature verification needs the issuer's key and should be done by your application or library.

Is it safe to paste production tokens here?

Decoding runs entirely in your browser, so the token is not transmitted. That said, if you are unsure, paste an expired or test token instead.

Why does my decoded payload show numbers instead of dates?

`exp`, `iat`, and `nbf` are Unix timestamps in seconds. Use the timestamp converter to translate them into local time.

Cookie Consent

We use cookies to enhance your experience and show relevant ads. You can customize your preferences.