A Client-Side JWT Playground — and Why alg:none Still Bites People
JSON Web Tokens carry your login session, your API authorization, your service-to-service trust — and debugging them is still mildly miserable. I built a browser-only JWT playground, and it's the perfect excuse to talk about one of auth's most famous footguns.
- JWT
- Identity
- AppSec
- Privacy-first
JSON Web Tokens are everywhere. They carry your login session, your API authorization, your service-to-service trust. And debugging them is still, somehow, a mildly miserable experience: you copy a token into a decoder, you squint at a Unix timestamp trying to remember if exp is in seconds or milliseconds, and you cross your fingers that the signature checks out.
I wanted something better for my own work in identity and auth, so I built a JWT Inspector & Playground: decode, verify, live-edit, and re-sign JSON Web Tokens — all in the browser, nothing uploaded. Along the way it became a nice excuse to talk about one of the most famous footguns in auth: the alg:none attack.
First, the boring-but-essential part: decoding
Paste a token and the tool splits it into its three parts — header, payload, signature — and decodes them. The payload is where the useful debugging lives, so it renders the standard claims in a human-readable way:
exp(expiration) andnbf(not-before) as actual dates, with warnings when a token is expired or not yet valid,iat(issued-at) so you can see how old it is,- and the rest of the claims laid out so you're not reading raw JSON.
Ninety percent of JWT debugging is just "is this thing expired and does it say what I think it says." That part should be instant, and now it is.
The interesting part: verification and the alg field
Decoding a JWT tells you what it claims. Verifying it tells you whether to believe it. The Inspector verifies signatures across the common algorithm families:
- HS256/384/512 — symmetric, verified against a shared secret.
- RS and ES — asymmetric, verified against a public key or JWK.
Supporting all of those cleanly behind one UI is its own small design challenge, but the genuinely important thing the tool does is flag the dangerous cases. And the most dangerous of all is an algorithm that means "don't bother checking."
alg:none: the vulnerability that refuses to die
Here's the attack, and it's almost insultingly simple.
A JWT's header declares which algorithm signs it: {"alg":"HS256"}. The JWT spec also defines a valid algorithm value: "none", meaning unsigned. It exists for legitimate cases where integrity is guaranteed by some other layer.
Now imagine a server that trusts the token's header to decide how to verify it. An attacker takes a legitimate token, changes the header to {"alg":"none"}, strips off the signature entirely, and edits the payload to say "role": "admin". If the server reads alg from the attacker-controlled header and goes "ah, none, nothing to verify" — it just accepted a forged token. Game over.
The variant is almost as nasty: an algorithm-confusion attack where a server expecting an RSA-signed token (verified with a public key) is tricked into treating the token as HMAC — using that public key as the HMAC secret. Since the public key isn't secret, the attacker can forge a valid signature.
Both bugs come from the same root cause: letting the untrusted token tell you how to trust it. The fix is to pin the expected algorithm on the server side and reject anything else.
The JWT Inspector surfaces these cases loudly — alg:none, weak secrets, and the like get flagged rather than silently "verified" — because the whole reason to look at a token under a microscope is to catch the thing that'll ruin your week.
Live-edit and re-sign (safely)
The "playground" half is where it gets fun. You can edit the header or payload in place, re-sign with a test key, and get a brand-new token out. It's perfect for building test fixtures, reproducing a bug, or demonstrating exactly how alg:none tampering works — without ever touching a production key.
And, like the rest of the tools I build, all of the crypto runs client-side. Tokens often are secrets — a live JWT is a bearer credential. Pasting one into a server-side decoder means handing your session to someone else's backend. The Inspector uses the jose library entirely in the browser, so your tokens never leave the page.
What I took away
- The spec's flexibility is the attack surface.
alg:noneisn't a bug in JWT — it's a feature being trusted in the wrong place. - A good debugging tool should have opinions. It's not enough to decode a token; the tool should tell you when something is wrong.
- "Never upload the credential" applies double here. A JWT is often the exact thing you're trying to protect.
Try it
The JWT Inspector & Playground is live at jwt-inspector-beryl.vercel.app. Paste a token, watch the claims resolve into real dates, and try flipping alg to none to see exactly what an attacker would try. Everything stays in your browser.
Davis Barillas is a forward deployed engineer working across security, identity, and AI. I build small, sharp, privacy-first tools around the problems I run into in the field.