Skip to content
Agents tracked: 440 Downloads (7d): 202M down 19.5% GitHub stars: 10.4M Releases (7d): 607 Agent status: 1 with issuesSince last limit reset: Claude 28d · Codex 0d Updated Oct 21, 2026

jose Examples You Can Edit and Run

5 small jose examples written by AgentGid from the official docs, one feature each. Every one runs in your browser: change the code and see the result at once, or describe a change and let AI rewrite it. The screenshots are taken from the same code by our server, which also checks that each example starts without errors.

jose: usage and stats 105 AI-built projects use it

Try them all in one place

import { SignJWT, decodeJwt } from 'jose'

const secret = new TextEncoder().encode('demo-secret-at-least-32-bytes-long!!')

const jwt = await new SignJWT({ role: 'admin', plan: 'pro' })
  .setProtectedHeader({ alg: 'HS256' })
  .setSubject('user-123')
  .setIssuedAt()
  .setIssuer('urn:example:issuer')
  .setAudience('urn:example:audience')
  .setExpirationTime('2h')
  .sign(secret)

const [header, payload, signature] = jwt.split('.')
console.log('token:', jwt.slice(0, 48) + '...')
console.log('length:', jwt.length, 'chars')
console.log('header part:', header.length, 'chars')
console.log('payload part:', payload.length, 'chars')
console.log('signature part:', signature.length, 'chars')

const claims = decodeJwt(jwt)
for (const [key, value] of Object.entries(claims)) {
  console.log('claim ' + key + ':', value)
}
Ctrl/⌘ + Enter runs

Free for signed-in members, with a daily limit. Describe the change in plain words; the new code runs only in your browser.

Change the expiration to '15m' or add another custom claim and watch the decoded payload update. Code written by AgentGid [1]. How it works, with a screenshot →

Checked Oct 12, 2026: each example starts without errors in Chromium with jose 6.2.12. Needs WebGL.

Sources

  1. jose README (GitHub)

Explanations written by AgentGid from the official docs; the numbers in brackets point here. The code marked "written by AgentGid" is ours and free to copy.

Building something with jose? Ask AgentGid →