Most JWT incidents come from how tokens are chosen, configured and validated, not from the format itself. Even so, several alternatives are worth knowing, because some of them solve problems JWTs were never designed for. This article covers five of them (opaque tokens, PASETO, CWT, Macaroons and Biscuit), then shows how to harden JWTs when you decide to keep them.
Why people look for alternatives
Four complaints come up again and again, and they do not all have the same fix.
- Algorithm agility. The
algheader lets the token tell the verifier how to check it. That design has enablednonesignatures, algorithm downgrades and RSA/HMAC key confusion. In OAuth and OpenID Connect the verifier normally pins the algorithm from configuration, which reduces the risk, but the history is long enough that it keeps driving the debate. If you want to see how the choice plays out in practice, read JWT Signing Algorithms: How to choose the right one? - Misuse. JWTs are often used as stateless browser sessions, a role they handle poorly: they are hard to revoke and easy to over-stuff with claims. No alternative format changes that. Server-side sessions do. Our article on managing invalid tokens in web and mobile applications covers the client side of that problem.
- Validation is left to you. A valid signature proves little on its own. Issuer, audience, expiry and token type must also be checked, and libraries often make some of those optional. How to verify a JWT? walks through the full checklist.
- Revocation. A self-contained token is valid until it expires unless the verifier keeps state, which defeats part of the point. See How to Invalidate a JWT Access Token? for the available patterns.
A new format can remove algorithm agility. It cannot fix misuse, and it only partly helps with validation. Keep that in mind when reading the options below.
How to compare them
Each option is judged on the same six questions.
- Who can verify? Anyone holding a public key, or only parties that share a secret.
- Who picks the algorithm? The token, a profile, or a fixed version of the format.
- How standard is it? An IETF RFC, or a community or project specification, and how mature the libraries are.
- Can the holder narrow it? Whether a client can reduce a token’s rights without going back to the issuer.
- How is it revoked? Before expiry, by what mechanism.
- Does it fit OAuth 2.0 and OpenID Connect? Whether it can serve as an access token without friction.
At a glance
JWT remains the default wherever OAuth 2.0 and OpenID Connect are involved, and the alternatives fall into three groups. Opaque tokens trade local verification for central control and immediate revocation. PASETO and CWT do the same job as a JWT: PASETO fixes the algorithm per version, and CWT swaps JSON for CBOR. Macaroons and Biscuit solve a different problem, delegation, where a holder narrows a token offline before passing it on. Biscuit does this with public keys, Macaroons with a shared secret. Public adopter lists are short for the newer formats, so the table names only adopters I could confirm.
Cells are coloured by how favourable the point is:
Strength Trade-off or depends on context Weakness
| Option | Who verifies | Algorithm choice | Standard and OAuth / OIDC fit | Holder can narrow it | Revocation | Known adopters |
|---|---|---|---|---|---|---|
| JWT (JWS) | Public key or shared key | Negotiated by the alg header unless pinned |
IETF, RFC 7519. Native | No | Short expiry plus deny-list | OpenID Connect ID tokens; JWT access tokens per RFC 9068 |
| Opaque + introspection | The authorization server | Not applicable | IETF, RFC 7662. Native | No | Immediate at the server | Spring Security (resource server support) |
| PASETO v4 | Public key or shared key | Fixed per version | Community spec, no RFC. No OIDC profile | No | Short expiry plus deny-list | No large public adopter found; Okta publishes the JPaseto Java library |
| CWT / COSE | Public key or shared key | Negotiated by COSE identifiers | IETF, RFC 8392 and 9052. IoT profiles (ACE-OAuth), not OIDC | No | Short expiry plus deny-list | EU Digital COVID Certificate, now maintained by WHO |
| Macaroons | Holder of the root secret | Fixed by the library | 2014 paper, no RFC. No standard profile | Yes, by adding caveats | Expiry caveat plus deny-list | Fly.io; Ping Identity Access Management |
| Biscuit | Public key | Fixed by the spec | Eclipse project spec v3.x, no RFC. Issuable as an access token, no standard profile | Yes, by appending blocks | Per-token revocation IDs plus your deny-list | Clever Cloud (Apache Pulsar authorization plugin) |
The alternatives
1. Opaque tokens with introspection
The oldest alternative is also the most common one in OAuth deployments: hand the client a random string and let the resource server ask the authorization server what it means, using token introspection (RFC 7662, section 2). There is nothing to forge or parse, claims never leave the authorization server, and revocation takes effect immediately.
The cost is a network dependency on every check. Caching reduces latency but brings back the freshness problem. When a resource server needs a signed answer, RFC 9701 lets the introspection endpoint return a JWT, so the response is signed even though the access token itself stays opaque.
We compared both approaches for service-to-service calls in JWT or Opaque Token: What is the best choice for M2M?, and Understanding OpenID Connect and OAuth 2.0 Tokens explains where each token type sits in the protocols.
Good fit: tokens handed to browsers or third parties, high-risk APIs, and anywhere immediate revocation matters more than local verification.
2. PASETO
PASETO (Platform-Agnostic Security Tokens) removes algorithm choice by versioning the format. A token such as v4.public.… states its version and purpose in the prefix: public tokens are signed, local tokens are encrypted with a shared key. A verifier configured for v4.public rejects anything else before parsing it.
Version 4 uses Ed25519 for signatures and XChaCha20 for encryption, and version 3 offers NIST-approved algorithms (ECDSA P-384, AES-256-CTR, HMAC-SHA384) for environments with compliance constraints. New deployments should start on v4, or v3 when a standard requires it. Versions 1 and 2 are legacy and kept by current libraries only for compatibility. Versions 3 and 4 also add implicit assertions, which bind a token to its context, and a footer for key identifiers.
The trade-offs are real. PASETO is not an IETF standard: the individual draft expired in 2022, and the specification itself is described as frozen. The library ecosystem is smaller than JWT’s, so check how each library handles issuer, audience and expiry validation. OpenID Connect requires ID tokens to be JWTs, so PASETO cannot replace those.
Good fit: internal service-to-service tokens where you control both ends and need no interoperability with OIDC.
3. CWT and COSE
CBOR Web Token (RFC 8392) is JWT’s binary sibling. Claims are encoded in CBOR instead of JSON and protected with COSE (RFC 9052), and the claim names follow JWT’s. Tokens are compact, which is why CWT shows up in constrained-device work (the IETF ACE framework) and in attestation (the IETF RATS working group).
Be clear about what it is: a different encoding of the same design, not a reset. COSE keeps the algorithm identifiers that JOSE has, so the agility concerns carry over. RFC 9864 addresses this for both families by deprecating polymorphic algorithm identifiers.
Good fit: constrained devices and protocols where bytes matter or CBOR is already in use.
4. Macaroons
Macaroons were introduced in a 2014 paper from Google researchers as bearer tokens carrying contextual caveats: restrictions on when, where, by whom and for what a token may be used. Anyone holding a macaroon can add a caveat, which narrows it, by extending a chain of MACs. Nobody can remove one. A third-party caveat goes further and requires a discharge macaroon from another service, for example a proof that the user is logged in elsewhere.
They are used in production. Fly.io builds its API tokens on macaroons, and Ping Identity’s access management product can issue them as OAuth 2.0 access and refresh tokens. The limits come from the design: verification is symmetric, so every verifying service needs the root secret or must call the issuer, and there is no IETF specification, so formats vary by library. If you go down that road, treat the root secret like any other HMAC key and follow our guide on generating a strong secret key for HMAC algorithms.
Good fit: systems where one organisation controls the issuer and the verifiers, and clients need to delegate narrower tokens.
5. Biscuit
Eclipse Biscuit is an open-source (Apache-2.0) authorization token built for distributed systems where centralised authorization is not possible. Like macaroons it supports offline attenuation, but it uses public-key signatures instead of a shared secret. Its main properties are:
- Decentralised verification. Any service holding the issuer’s public key can verify a token, so no secret has to be distributed.
- Offline attenuation. A holder can derive a token with fewer rights, such as read-only or short-lived, without contacting the issuer.
- Datalog policies. Authorization rules are written in Datalog. They can come from the verifying application or travel inside the token as attenuation checks.
- Capabilities or ACLs. Rights can be carried in the token per request, or enforced on the verifier side with access control lists.
- Revocation identifiers. Each token has a unique identifier, and rejecting it also rejects every token attenuated from it.
A token is a list of blocks. The issuer writes the first block, anyone can append more, and any failed check in any block invalidates the whole token. Here is an illustrative example (not production code):
// authority block, signed by the issuerright("/reports/q3.pdf", "read");right("/reports/q3.pdf", "write");
// block appended offline by the holder before calling a downstream servicecheck if operation("read");check if time($t), $t < 2026-12-01T00:00:00Z;
// policy supplied by the verifying serviceallow if resource($r), operation($o), right($r, $o);The holder started with read and write rights and passed on a token that can only read, and only until the end of the month. The issuer was never contacted.
The specification is on GitHub with predefined test cases, and implementations exist for Rust, Haskell, Go, Java, JavaScript (Node and browser), WebAssembly, C, Python and C#. Tokens are serialised with Protobuf and signed with Ed25519. Third-party blocks, which let another service sign a block of the token, arrived with specification version 3.2, and support still varies by language, so check the project’s compatibility table before relying on them.
Know the boundaries. Biscuit is not an authentication protocol, and revocation needs external state: the revocation identifier gives you something to deny-list, but the deny-list is yours to keep. It has no standard OAuth profile, although the project describes it as something an OAuth server can issue as the access token. And Datalog is a new mental model for most teams.
If your delegation need is between services inside an OAuth 2.0 deployment, check first whether OAuth 2.0 Token Exchange and the pattern described in Delegation Done Right: Token Exchange and the On-Behalf-Of Pattern already cover it, since they work with standard tooling. Capability-style tokens such as Biscuit also become relevant when agents call tools on behalf of users, a topic we cover in Securing the New Attack Surface: Authorization for Tool-Calling Agents and MCP.
Good fit: microservice architectures where a gateway holds a broad token and narrows it before each downstream call, and any case where clients delegate restricted access to others.
Hardening JWTs instead
When JWTs fit your protocol, the practical path is to constrain them rather than replace them. Five measures cover most of the criticism.
- Pin the algorithm on the verifier. Never let the token header decide. RFC 8725, section 3.1 requires verifiers to check that the algorithm is one they expect for that key.
- Use explicit typing. RFC 8725, section 3.11 recommends the
typheader so that one kind of JWT cannot be accepted as another, for example an ID token as an access token. - Validate every claim that matters. Check
iss,audandexpon every token. For OAuth access tokens, follow the JWT profile in RFC 9068, which defines the required claims and the validation steps in its section 4. Our article on OAuth 2 access token claims explains what each claim means, and Validating JWTs from Multiple Issuers covers the case where several issuers share an API. RFC 8725 is being revised: draft-ietf-oauth-rfc8725bis would obsolete it if approved, so watch for the final text. - Prefer fully-specified algorithm identifiers. RFC 9864 (October 2025) deprecates polymorphic identifiers such as EdDSA in JOSE and COSE, so that an identifier names the exact curve and hash rather than leaving them to the key.
- Keep lifetimes short and sessions out of tokens. Use server-side sessions for browser sessions, and short-lived access tokens with refresh tokens elsewhere.
One idea is worth knowing, though it is not standardised: versioned JWTs, suggested by Neil Madden. A small fixed set of algorithm combinations (local and public, version one and two) would be allowed and everything else prohibited, giving JWTs PASETO’s main benefit without a new format.
Whichever way you go, rely on a well-tested library rather than your own code. The awesome-jwt list references libraries for most languages, and its JWT alternatives section keeps track of PASETO, Biscuit, Macaroons and other implementations as the ecosystem evolves.
Choosing in practice
The alternative to a JWT is rarely a differently shaped token. It is usually a different architecture, so start from the use case.
- Browser sessions: a server-side session cookie. This is not a token-format question.
- API access tokens in OAuth 2.0 and OIDC: a hardened JWT following RFC 9068, or opaque tokens with introspection when you need immediate revocation or do not want claims exposed to clients.
- Internal service-to-service tokens, both ends under your control: PASETO v4, or v3 where compliance requires NIST algorithms.
- Constrained devices or binary protocols: CWT with COSE.
- Delegation between services, or clients handing out restricted access: Biscuit when verifiers should hold only a public key, Macaroons when verifiers can share a root secret.
- OpenID Connect ID tokens: JWT. The specification requires it.
What was left out
Two other formats, Fernet and Branca, are not covered either. Both are symmetric-only. Fernet’s specification still has a single version built on AES-128-CBC, and Branca modernises it with XChaCha20-Poly1305 but has little library support. PASETO local tokens cover the same ground with versioning, so they are not reviewed here. PASETO versions 1 and 2 are also skipped, since current libraries keep them only for existing tokens. “Just sign some JSON” with a crypto library is a custom protocol rather than a token format.