Why decode JWTs during development?
A JSON Web Token packages claims that APIs and browsers exchange after login. When a request fails with 401 or 403, teams often need a fast JWT payload decoder to confirm scopes, tenant IDs, and expiry without spelunking through proprietary dashboards. This utility answers: “What did the issuer put in the token?”—not “Should my API trust it?” Trust requires cryptographic verification with the right keys, which belongs in your authorization server middleware, API gateway, or backend framework.
Because decoding is only Base64URL + JSON, it is safe for structure inspection but trivial to forge if verification is skipped. Treat this page like a multimeter: great for signal tracing, not a substitute for production authZ checks. When you normalize other wire formats, open the Base64 encoder & decoder for raw segments or the URL encoder & decoder when tokens travel in query strings.
How to use this JWT decoder (step by step)
- Paste the full token into the textarea—usually an access token or ID token from Authorization: Bearer headers. The field accepts a leading
Bearerprefix; whitespace is trimmed automatically. - Read the decoded header JSON for
alg,typ, and optionalkid(key id). Then review the payload for audience, subject, roles, and custom claims your product relies on. - Check the coloured status line for exp and nbf relative to your system clock. Refresh tokens, skew-tolerant servers, or cached sessions may still behave differently—this is a developer hint, not an authorization decision.
- Use Copy on each panel to move JSON into VS Code, Postman, or tickets. For large claim sets, continue editing with the JSON formatter or diff changes with the code diff checker.
JWT decoder keywords teams search for
Engineers often look for an online JWT parser, JWT inspector, or decode JWT Base64URL when tracing mobile apps, SPAs, and microservices. Related searches include OIDC ID token decode, OAuth access token claims, and JWT exp checker. This page documents those workflows explicitly and keeps processing local so regulated teams can avoid SaaS uploads for routine inspection.
Header claims: alg, typ, kid, and why they matter
The header tells verifiers which algorithm and key material to use. Libraries must reject unexpected alg values (especially none) to prevent algorithm confusion attacks. The optional kid points to a JWK in your issuer’s JWKS document so rotating keys does not break every client at once. Seeing these fields clearly helps when you compare tokens from staging vs production issuers or debug multi-tenant setups. For hashing and fingerprint ideas outside JWT, see the hash generator.
Payload claims: registered, public, and private names
JWT payloads combine registered claim names (like iss, sub, aud) with vendor-specific fields. Public names should be documented in registries; private names are agreements between your frontend and API. Decoding reveals structure but not truth—always reconcile claims with your identity provider and server-side policy. If you export claim snapshots to YAML configs, round-trip through YAML to JSON to validate shape before deployment.
Limitations: no JWE, no signature or encryption verification
Encrypted JWTs (JWE) use five segments and require decryption keys—this tool does not decrypt ciphertext. It also ignores the signature segment entirely, so tampered tokens still decode. For production, use maintained libraries, validate issuer and audience, enforce clock skew, and fetch keys over TLS from a trusted JWKS endpoint. When you test cron-based token rotation jobs, schedule math belongs in the cron expression explainer rather than JWT math alone.
Related developer tools
Explore the full code and developer tools catalog. Highlights:
- JSON Formatter & Validator — Format, validate, minify, and explore JSON in a collapsible tree—fix payloads before they hit production.
- JSON to CSV Converter — Turn JSON arrays into downloadable CSV with automatic column detection for spreadsheets and BI tools.
- JSON to YAML Converter — Convert JSON to readable YAML for configs and Kubernetes—copy or download the result.
- CSV to JSON Converter — Paste or upload CSV and get structured JSON with header-aware typing for APIs and apps.
- YAML to JSON Converter — Parse YAML to valid JSON with clear errors—ideal for CI configs and cloud templates.
- XML Formatter & Validator — Beautify and validate XML with structure insight and actionable parse errors.
- Regex Tester & Debugger — Test patterns live with highlights, capture groups, and flags—debug regex without leaving the browser.
- SQL Formatter — Pretty-print SQL with indentation and keyword casing for readable queries and code review.
- HTML Formatter & Minifier — Beautify or minify HTML and compare raw markup with a quick rendered preview.
- CSS Formatter & Minifier — Format messy stylesheets or minify CSS for faster loads—keep design tokens consistent.
- JavaScript Formatter & Minifier — Pretty-print or minify JavaScript for debugging locally and shipping smaller bundles.
- HTML to Markdown Converter — Convert HTML snippets to Markdown for docs, CMS migrations, and README cleanup.
- Markdown to HTML Converter — Turn Markdown into HTML with a live preview—handy for emails, blogs, and static pages.
- Code Diff Checker — Compare two code blocks side by side with clear add/remove highlighting for reviews.