Skip to content
Insights
Request Services
JWT structure
Cheat sheet · printable · CC BY 4.0

JWT structure — anatomy + claims

The three segments, registered claims, signing algorithms, and validation checklist — on one page.

Share

Use your browser print dialog. Landscape orientation, single page.

askmeidentity · JWT structure · 2026-05-22

JWT structure — anatomy + claims

A printable single-page reference for JSON Web Tokens — the three base64url segments, all RFC 7519 registered claims, common signing algorithms, validation must-checks, and the most common JWT attack vectors.

The three segments

Headerbase64url JSONTyp, alg, kid (key id), jku (JWK URL)
Payloadbase64url JSONClaims — registered + private
Signaturebase64url bytesHMAC or asymmetric signature over header.payload

Registered claims (RFC 7519)

issstringIssuer — who minted the token
substringSubject — typically user ID
audstring | arrayAudience — who can consume the token
expNumericDateExpiration — past this, token is invalid
nbfNumericDateNot Before — token not valid until this time
iatNumericDateIssued At — when the token was minted
jtistringJWT ID — unique identifier for revocation

Common signing algorithms

HS256HMAC + SHA-256Symmetric. Shared secret. OK for internal services.
RS256RSA + SHA-256Asymmetric. Most common for OIDC ID Tokens.
ES256ECDSA P-256 + SHA-256Smaller signatures. Modern preference.
PS256RSA-PSS + SHA-256RSA-PSS variant. Marginally more secure than RS256.
EdDSAEd25519Modern, fast, small. Increasingly supported.
none(no signature)NEVER trust this in production.

Verifier must check (every time)

  • ·Signature against the issuer's JWKS (key by kid)
  • ·iss exactly matches the expected issuer URL
  • ·aud contains the relying party's identifier
  • ·exp > now (clock-skew tolerance ≤ 5 min)
  • ·nbf ≤ now (when present)
  • ·iat ≤ now (when present)
  • ·alg matches what the issuer is supposed to use (reject alg substitution)
  • ·For OIDC ID Tokens: nonce matches the value sent in /authorize

Common JWT attack vectors

  • ·alg=none — verifier accepts unsigned tokens. Always require a specific alg.
  • ·alg substitution (RS256 → HS256) — attacker signs with public key as HMAC secret.
  • ·kid header injection — attacker controls which key the verifier loads (SQLi / LFI in key resolution).
  • ·jku / x5u header — attacker points the verifier to a key they control. Pin to trusted JWKS only.
  • ·Signature stripping — verifier accepts token with empty signature segment.
  • ·Audience confusion — token meant for service A accepted by service B (mitigated by strict aud check).

JWT vs opaque token

JWT (self-contained)No introspection call needed; verifier checks signature locallyStateless. Hard to revoke before exp.
Opaque tokenVerifier introspects against issuer (RFC 7662)Stateful. Trivial to revoke.
When to use eachJWT for high-volume API auth; opaque when revocation matters more than throughput
askmeidentity.com · CC BY 4.0 · Reviewed 2026-05-22
More cheat sheets

All printable references in one place.

See all cheat sheetsStandards explainers

Identity, cybersecurity, and custom software for regulated enterprises. Audit-ready operations from advisory through audit.

Americas HQ

Wilmington, DE

America/New York

India HQ

Hyderabad, TG

Asia/Kolkata

Services
  • IAM Consulting
  • IAM Technologies
  • Custom Software & AI
  • IAM Staffing
  • Request Services
  • Case Studies
Resources
  • All Resources
  • Complete Guide to IAM
  • IAM Frameworks Compared
  • IAM Certification Roadmap
  • IAM API Hub
  • IAM Explainers
  • IAM Vendor Status
  • Release Notes
  • State of Identity
  • State of PAM
  • State of IGA
  • State of CIAM
  • State of AI Agent Identity
  • IAM Salary Benchmark
  • Vendor Pricing Index
  • Year in Review 2026
  • Acquisition Tracker
  • Outage Tracker
  • Identity Incidents
  • Vulnerability Tracker
  • Cheat Sheets
  • Standards Explainers
  • Migration Playbooks
  • Audit Checklists
  • Reference Architectures
  • RFP Templates
  • IAM Anti-Patterns
  • Compliance Crosswalk
  • Market Landscape
  • Awesome IAM
  • IAM Glossary
  • Compliance Frameworks
  • Integration Guides
  • Vendor Alternatives
  • IAM by Industry
  • Salary Lookup
  • Directory
Research & media
  • IAM Compensation 2026
  • Vendor Moves Q3 2026
  • Identity Incidents Q3 2026
  • Vendor Security Posture 2026
  • Vendor Pricing 2026
  • AI Citation Tracker
  • Top 50 IAM Tools 2026
  • Podcast
  • Videos
  • Newsletter
  • Newsletter Archive
  • Embed Widgets
Free tools
  • JWT Decoder
  • JWT Signer
  • SAML Decoder
  • SAML Metadata Diff
  • OAuth Flow Visualizer
  • OIDC Debugger
  • OIDC Discovery Validator
  • PKCE Generator
  • WebAuthn Tester
  • Bearer Token Inspector
  • SCIM Validator
  • Password Entropy
  • IAM RFP Template
  • PAM Vendor Selector
  • Maturity Assessment
  • ROI Calculator
  • TCO Calculator
  • MFA Bypass Risk
  • Audit-Prep Burden
  • Quizzes
Company
  • About
  • Leadership
  • Approach
  • Why Choose Us
  • Partners
  • Press Kit
  • Press Topics
  • Global Presence
  • Locations
  • Insights
  • Now
  • Community
  • Open Roles
  • Submit Resume
  • Training
  • Contact

© 2026 askmeidentity, Inc.. Safeguard your digital frontier.

  • Privacy Policy
  • Terms of Service
  • Accessibility