---
title: "JWT Decoder, Verifier & Security Check · camada"
description: "Decode JWT headers and claims in your browser with zero network calls. Verify HS256, RS256, and ES256 signatures, flag alg:none, and check expiry."
url: https://www.camada.app/tools/jwt-decoder
last_updated: 2026-11-19
---

# Decode, verify, and audit JSON Web Tokens in your tab

Paste any JWT to decode its JOSE header and payload claims in your browser with zero network calls. Verify HS256, RS256, and ES256 signatures with WebCrypto. Flag alg:none, check expiry claims, and compare cookie vs storage risk.

- [Decode and verify JWT](https://www.camada.app/tools/jwt-decoder#decoder)
- [Claim and pitfall reference](https://www.camada.app/tools/jwt-decoder#reference)
- [Scan live URL cookie flags](https://www.camada.app/tools/website-security-check)

## Inspect JOSE headers, claims, and signatures

Paste a compact `header.payload.signature` string or `Authorization: Bearer` header below. Everything stays inside this browser tab.

## Pin algorithms on the server and lock cookies in the browser

Most JWT bugs come from trusting the unverified header or keeping raw bearer tokens in `localStorage`. Use these two defaults in production.

### 1. Enforce algorithm, issuer, audience, and max age

Pass a fixed `algorithms` list so `alg: "none"` and key-confusion payloads fail before claims run.

verify.ts · jose

```ts
import { jwtVerify, importSPKI } from 'jose';

const publicKey = await importSPKI(process.env.AUTH_ES256_PUBLIC_KEY!, 'ES256');

// Pin algorithms, issuer, audience, and max token age explicitly
const { payload } = await jwtVerify(rawToken, publicKey, {
  algorithms: ['ES256'],
  issuer: 'https://auth.example.com',
  audience: 'https://app.example.com',
  maxTokenAge: '15m',
});
```

### 2. Store browser tokens in a __Host- HttpOnly cookie

Combine `HttpOnly`, `Secure`, `SameSite=Lax`, and a 15-minute `Max-Age`.

session.ts · Set-Cookie

```ts
// Keep browser session JWTs out of localStorage so XSS cannot read them
res.setHeader(
  'Set-Cookie',
  [
    `__Host-session=${signedJwt}`,
    'Path=/',
    'Max-Age=900',
    'Secure',
    'HttpOnly',
    'SameSite=Lax',
  ].join('; ')
);
```

## JOSE header, RFC 7519 claim, and pitfall reference

RFC 7515 and RFC 7519 define the core JWT header fields and payload claims. Check every field below before trusting a caller identity.

### Nine core JWT header parameters and registered claims

What each field means on the wire and what your backend verifier must enforce.

| Field | Section | Purpose | Verifier rule |
| --- | --- | --- | --- |
| alg | JOSE header | Names the signing algorithm, such as ES256, RS256, or HS256. | Pin an explicit server allowlist. Reject none and unexpected families. |
| kid | JOSE header | Selects which key ID verified the token during key rotation. | Match against a static JWKS map. Never pass raw kid into SQL or file paths. |
| iss | Payload claim | Identifies the auth server or tenant that minted the token. | Compare against the exact issuer string your backend trusts. |
| sub | Payload claim | Identifies the user or workload principal for the session. | Scope sub per issuer so two identity providers never collide. |
| aud | Payload claim | Names the API or service meant to accept the token. | Reject tokens minted for sibling apps or external services. |
| exp | Payload claim | Sets the Unix timestamp (seconds) when the token expires. | Require exp on session tokens and keep lifetimes short (5 to 15 minutes). |
| nbf | Payload claim | Sets the earliest Unix timestamp when the token becomes active. | Reject tokens before nbf, allowing only a few seconds of clock skew. |
| iat | Payload claim | Records the Unix timestamp when the issuer minted the token. | Use iat to enforce max session age or revoke tokens minted before a password reset. |
| jti | Payload claim | Assigns a unique token ID to spot replays on one-time flows. | Cache seen jti values until exp on high-risk actions or refresh exchanges. |

### Six common JWT security pitfalls and fixes

Classic implementation mistakes that let attackers forge claims or lift bearer tokens.

| Pitfall | Failure mode | Defense |
| --- | --- | --- |
| alg: "none" signature bypass | An attacker sets "alg": "none" and drops the signature segment to forge admin claims. | Pin a fixed algorithm list like ["ES256"] and reject empty signatures. |
| RS256 to HS256 key confusion | An attacker switches alg from RS256 to HS256 and signs the token using your public RSA key. | Bind each key object to one algorithm family. Never pass a public key into HMAC checks. |
| jku, x5u, and embedded jwk headers | The token header supplies an attacker URL or inline public key that a naive library trusts. | Ignore jwk, jku, and x5u in untrusted headers. Load keys only from your pinned JWKS origin. |
| Secrets inside readable JWS payloads | Teams put API keys or password hashes in JWS claims. Base64url is plain text. | Keep only opaque IDs and scopes in JWS claims, or encrypt the token as a JWE. |
| Missing exp or unchecked aud | Tokens without exp never expire if leaked. Tokens without aud replay on sibling APIs. | Require exp, iss, and aud on every check. Cap browser access tokens at 15 minutes. |
| localStorage vs __Host- HttpOnly cookies | Any XSS script on your site can read localStorage and steal raw bearer tokens. | Store browser session tokens in a __Host- cookie with Secure, HttpOnly, and SameSite=Lax. |

## Why valid JWTs still face account takeover and scraping

A valid JWT signature only proves your server minted the token. Attackers still mint real tokens through password sprays on `/login`. They also replay stolen tokens across hundreds of API calls. camada never reads `Authorization` or `Cookie` values. Watchkeeper links `track('login_failed')` events and request rates across routes. That catches password sprays and scrapers inside your app.

1

### Authorization and Cookie values stay in your app

camada SDKs strip Authorization headers, Cookie values, and request bodies inside your process. Raw JWTs and session secrets never leave your servers.

[Read camada privacy and redaction rules](https://www.camada.app/security)

2

### Spot password sprays with hashed track() events

A valid JWT cannot show if an attacker guessed 40 passwords first. Calling track("login_failed") links failed logins across accounts. Raw emails stay hidden.

[See credential stuffing detection](https://www.camada.app/use-cases/credential-stuffing)

3

### Verify live cookie flags on your public routes

Scan your live login and app URLs with our website security tool. Confirm that cookies set Secure, HttpOnly, SameSite, and __Host- flags.

[Scan your live URL for cookie flags](https://www.camada.app/tools/website-security-check)

### Check cookies, headers, CORS, and bot signals together

Scan your live routes for `HttpOnly` cookie flags, audit your `Content-Security-Policy` against XSS, or test `CORS` credential rules. Add one open-source camada SDK when you want in-app session scoring.

- [Website security and cookie check](https://www.camada.app/tools/website-security-check)
- [CSP and security headers check](https://www.camada.app/tools/security-headers)
- [Live CORS preflight checker](https://www.camada.app/tools/cors-checker)
- [Live bot signal test](https://www.camada.app/tools/bot-test)
- [HAR sanitizer](https://www.camada.app/tools/har-sanitizer)
- [All developer tools](https://www.camada.app/tools)
- [Credential stuffing guide](https://www.camada.app/use-cases/credential-stuffing)

SDK guides

- [Cloudflare, no code](https://www.camada.app/docs/cloudflare)
- [Hono on Workers](https://www.camada.app/docs/hono)
- [Python](https://www.camada.app/docs/python)
- [Go SDK](https://www.camada.app/docs/go)
- [PHP](https://www.camada.app/docs/php)
- [Ruby](https://www.camada.app/docs/ruby)
- [Java](https://www.camada.app/docs/java)
- [.NET](https://www.camada.app/docs/dotnet)

Example verdict malicious · 91% confidence · 6 hours

session: ses_7f3a9c1e04b2 · action: blocked

This session submitted login attempts for many different accounts with one password pattern. The failure rate and pacing match a stolen-credential list being replayed.

- 38 login attempts for 36 different usernames in 3 minutes
- 97% of attempts returned an invalid credentials response
- Requests spaced at near-identical intervals of about 4.7 seconds
- Login form posted with no prior page view of the form

## Questions about JWT decoding and security

Want to guard login and API routes without touching raw session tokens? Read the [credential stuffing guide](https://www.camada.app/use-cases/credential-stuffing) or check [plans and limits](https://www.camada.app/pricing).

**Does pasting a JWT on this page send my token over the network?**

No. Decoding, claim checks, and signature checks run 100% inside your browser tab. This page makes zero network calls, sets zero cookies, and writes nothing to storage. Even so, use test or expired tokens when you can.

**Can anyone read the payload inside a standard JWT without my secret key?**

Yes. Standard JSON Web Tokens (JWS) base64url-encode the header and payload in plain view. The signature only stops tampering; it does not hide the data. Anyone who sees the token can decode every claim in milliseconds. Never place raw passwords, API keys, or unencrypted secrets inside a JWS payload.

**What is the JWT alg:none or RS256-to-HS256 confusion bug?**

Broken JWT setups trust the alg field inside an untrusted token header. An attacker could set "alg": "none" to strip the signature. Or they could switch "alg" from RS256 to HS256 and sign with your public RSA key. Always pin an explicit algorithm allowlist in your verifier.

**Should I store session JWTs in localStorage or an HttpOnly cookie?**

Storing tokens in localStorage exposes them to any XSS script on your origin. For browser apps, use a short-lived cookie with Secure, HttpOnly, and SameSite=Lax. Add the __Host- prefix too so JavaScript and sibling subdomains cannot touch the token.

**Does camada inspect my JWT payload or Authorization header?**

No. camada SDKs strip Authorization headers, Cookie values, and bodies inside your app. Watchkeeper spots password sprays through track('login_failed') hashes. It also flags high-rate scraping without ever touching your session secrets.

## Use it from an AI agent

This page is also Markdown at [/tools/jwt-decoder.md](https://www.camada.app/tools/jwt-decoder.md). Agents can also run the check itself, without the form.

- `decode_jwt` in this tab, through WebMCP

  Takes `token`. Decode a JSON Web Token in this tab: header, claims, and checks for alg none, expiry, not-before and issued-at times. It does not verify the signature; the page does that with a key. The token is not sent anywhere.

  What leaves this tab: Nothing. The token is decoded in this tab.

The MCP server needs no key. Every agent tool on this site is listed in the [server card](https://www.camada.app/.well-known/mcp/server-card.json) and on [the tools page](https://www.camada.app/tools#agents).

## Related tools

- [HAR sanitizer](https://www.camada.app/tools/har-sanitizer)

  Drop a HAR file and get a copy safe to send to support. Cookies, bearer tokens, JWTs, API keys, and passwords are redacted in your tab.
- [CORS checker](https://www.camada.app/tools/cors-checker)

  Run a live OPTIONS preflight with a test Origin, or paste curl headers. Spot reflected origin leaks, wildcard credential bugs, and missing Vary headers.
- [Login page check](https://www.camada.app/tools/login-page-check)

  Review your login page for HTTPS, form fields, cookie flags, and security headers. Paste two responses to spot account enumeration.

[All free tools](https://www.camada.app/tools)

## Stop password sprays before attackers mint valid tokens.

Install the SDK on the Free plan to score 100,000 events a month with no card. Enable in-app blocks and challenges on Starter ($59/month) or Growth ($249/month).

- [Get started free](https://my.camada.app/)
- [In-app bot detection](https://www.camada.app/bot-detection)
- [Scan your live URL](https://www.camada.app/tools/website-security-check)
- [See pricing](https://www.camada.app/pricing)

Free needs no card. A 14-day trial of Starter or Growth needs a card. Nothing is charged today. Cancel before the trial ends (the date is shown in the app) and you pay nothing. Otherwise the plan's monthly price starts on day 15.

## Sitemap

[Every page on this site](https://www.camada.app/sitemap.md)
