Skip to content
SIEMBench
100% Client-Side Tool • Inputs Never Sent to Our Servers

JWT Decoder & Security Auditor

Paste a JSON Web Token to read its header and claims, check its signature with your own key, and see security findings ranked by severity.

Header . Payload . Signature

Paste a token. A "Bearer" prefix and line breaks are removed.

No token yet.

Header

Payload

Issued iat
not set
Valid from nbf
not set
Expires exp
not set

Security audit 0

Findings appear here. The audit reads the token only and cannot see how your server validates it.

    How to use this tool in a SOC investigation

    1. Paste the token from the request log, following your policy for live credentials.
    2. Compare its user, issuer and times with the sessions you expect.
    3. Read the findings, and check the signature with your key to tell a forged token from a stolen one.

    Example: A web log shows admin access without a logon. If the token header says alg is none, the auditor rates it Critical, because the token is unsigned and anyone could have written its claims. Check whether the server accepted it.

    Frequently asked questions

    Is it safe to paste a production JWT here?

    The tool decodes, audits and verifies in your browser and makes no network requests, so the token and key are not sent to our servers. A live token is still a credential, and other software on your device, such as browser extensions, may be able to read the page. Prefer an expired or test token, follow your policy, and revoke any token you think has been exposed.

    Is a JWT encrypted?

    A signed JWT, the common three-part kind, is not encrypted. Its header and payload are Base64URL-encoded JSON that anyone can decode without a key. The signature prevents undetected changes and does not hide anything. Encrypted tokens use JWE, which has five parts.

    Does decoding a JWT verify it?

    No. Decoding only reads the text, and anyone can write a token that decodes cleanly. Verification checks the signature against a key you trust, and then the server must also check the expiration, issuer, audience and algorithm. Never make an access decision on a token that was only decoded.

    What is an algorithm confusion attack?

    It targets servers that let the token choose the algorithm. The attacker takes the RS256 public key, which is not secret, and signs a forged token with HS256 using that public key text as the HMAC secret. A vulnerable library then verifies it with the same public key and accepts it. Pinning the algorithm on the server prevents this.

    Anatomy of a JSON Web Token

    A JSON Web Token (JWT), defined in RFC 7519, is a compact way to carry claims between two parties. The common signed form uses JSON Web Signature (RFC 7515) and has three Base64URL parts joined by dots.

    base64url(header) . base64url(payload) . base64url(signature)
    PartContentsTrust it?
    HeaderAlgorithm (alg), type and key hints such as kidNever before verification, and treat key hints as hostile input
    PayloadClaims such as sub, iss, aud, expOnly after the signature and claims are checked
    SignatureHMAC or digital signature over the first two parts as transmittedIt is the proof, if you verify it with the right key

    The signature covers the encoded text of the first two parts and not the decoded JSON. Changing one character of either part, even in a way that decodes to the same data, invalidates the signature.

    Base64URL is encoding, not encryption

    Base64URL turns bytes into characters that are safe in URLs and headers. It replaces + and / with - and _, and JWTs omit the = padding. There is no key, and reversing it takes no effort. Anything in a JWT payload can be read by the user who holds it, by every proxy that logs it, and by any script that can reach it.

    That makes claims such as password, api_key or ssn a data exposure even when the signature is perfect. The auditor looks for names like these at every level of the payload. Keep secrets on the server and put an opaque identifier in the token instead.

    Common JWT attacks

    Unsigned tokens with alg: none

    The specification defines none for tokens protected by some other means. Early libraries accepted it by default, so an attacker could change the header to none, edit any claim and delete the signature. Filters that blocked only the lowercase word were bypassed with None or nOnE. The fix is to allow a fixed list of algorithms instead of blocking bad ones.

    RS256 to HS256 algorithm confusion

    RS256 verifies with a public key, and HS256 verifies with a shared secret. If one verify function accepts either kind of key and takes the algorithm from the token, an attacker can sign with HS256 and use the public key file as the secret. During an authorized test you can check for this here: if an HS256 token verifies when you paste a PEM public key as the secret, the tool warns that it looks like an algorithm confusion attack.

    Key ID (kid) injection

    The kid header tells the server which key to use, and it arrives before anything has been verified. Where it reaches a file path, ../../dev/null can select an empty file as the HMAC key. Where it reaches a SQL query, ' UNION SELECT can return a key of the attacker's choice. Look up key IDs in a fixed map and reject anything that is not in it.

    Attacker-supplied keys: jwk, jku and x5u

    These headers embed a key or point to one. A verifier that trusts them lets the attacker bring their own key. The URL forms also make the server fetch an address of the attacker's choosing, which is server-side request forgery.

    Weak HMAC secrets

    One captured HS256 token is enough to test guesses offline at high speed, with no rate limit and no log entry. RFC 7518 requires a key at least as long as the hash output, which is 32 bytes for HS256, 48 for HS384 and 64 for HS512. Length alone is not enough. The key should come from a secure random generator and not from a person.

    What the auditor checks

    SeverityExamples
    Criticalalg: none, missing signature, embedded jwk, path traversal or SQL injection in kid
    HighNo exp, jku or x5u present, sensitive-looking claims, missing alg
    MediumExpired, lifetime over 24 hours, times in milliseconds, x5c, crit
    InfoTime remaining, notes on the algorithm, missing iss or aud

    Findings describe the token and not your server. A token with jku is safe if the verifier ignores it, and a token with no findings can still be accepted by a server that never checks signatures. An expired token is listed as Medium because it is worth noticing, although expiry is normal. ID tokens and refresh tokens may have a longer lifetime by design.

    Best practices for developers

    1. Pin the algorithm in the verifier's configuration, and bind each key to one algorithm.
    2. Check every claim you rely on: exp, nbf, iss and aud, with a small allowance for clock drift.
    3. Keep access tokens short-lived, from minutes to an hour, and use rotating refresh tokens for longer sessions.
    4. Prefer asymmetric signatures when several services verify, so that verifiers cannot forge tokens.
    5. Plan revocation. A signed token stays valid until it expires unless you track a jti or session version.
    6. Protect storage. A token in local storage can be read by any injected script. A cookie with HttpOnly, Secure and SameSite is harder to steal.

    Workflow for pentesters and responders

    1. Decode the token and read the findings from the most severe down.
    2. Note the algorithm, key ID and lifetime, and whether the issuer and audience match the target.
    3. With permission, test whether the server rejects an altered signature, none, and an expired token.
    4. Verify with the published public key to confirm which key signed the token.
    5. In an incident, compare iat and exp with your timeline to learn how long a stolen token was usable.
    6. Redact the signature before you put a token in a ticket. Without it, the token cannot be replayed.

    Verification here supports HS256, HS384, HS512, RS256 and ES256. Other algorithms are decoded and audited without it. Large numbers and duplicate keys are displayed exactly as they appear in the token, because many tools round or drop them and the difference can matter in an investigation.

    Why does my correct secret show as not matching?

    The usual cause is encoding. Many systems store the secret as Base64, so switch between Text and Base64. Also check for trailing spaces or line breaks, confirm that the header names the algorithm you expect, and make sure that the whole token was copied. For RS256 and ES256, paste the public key and not a certificate.