JWT Decoder
Decode, inspect, and validate JWT tokens with claim and signature analysis.
Free online JWT decoder, inspector, and validator. Decode JSON Web Tokens (RFC 7519) instantly to inspect header metadata, payload claims, and signature verification status. Parse registered claims (iss, sub, aud, exp, nbf, iat, jti) with human-readable timestamps and a real-time expiration countdown timer. Verify HMAC signatures (HS256, HS384, HS512) using secret keys, detect security vulnerabilities like alg: none or weak keys, and debug OAuth 2.0 and OpenID Connect (OIDC) access and ID tokens. Runs 100% client-side in your browser with zero server data transmission for maximum security.
Keywords: jwt decoder, jwt decoder online, jwt decode, jwt token decoder, decode jwt token, jwt parser, jwt validator, jwt inspector, jwt claims viewer, jwt expiration checker, jwt signature verification, json web token decoder, jwt debugger, jwt online tool, jwt token validator, oauth token decoder, openid connect token inspector, base64url jwt decode, jwt header payload signature, jwt verify hs256, jwt alg none vulnerability, client side jwt decoder
Tags: jwt, decode, token, auth, oauth, validate, inspector, security
Popular Developer Tools tools
- Cron ParserParse, validate, explain, and build cron expressions with next run times and visual timeline.
- Regex TesterTest, debug, and explain regular expressions with real-time match highlighting.
- Regex ExplainerBreak down any regex into plain English, token by token.
- AI Token CounterCount tokens and estimate API costs for 100+ LLMs with exact BPE and provider tokenization.
- AI Prompt BuilderBuild structured LLM prompts with per-section token counting, variable injection, and provider-aware exports for OpenAI, Anthropic, and Google.
JWT Decoder is also known as: JWT Token Decoder, JWT Decoder Online, JWT Inspector, JSON Web Token Decoder, JWT Debugger Online, JWT Signature Verifier, JWT Claims Viewer, Decode JWT Online, JWT Expiration Checker, OAuth Token Decoder.
How to JWT Decoder Online
Paste your raw JSON Web Token (JWT) into the input editor or choose one of the preconfigured sample tokens (HS256, OAuth 2.0 access token, OIDC ID token, or custom claims).
The token is automatically parsed in real time into three visual segments: Header (algorithm & key metadata), Payload (registered & custom claims), and Signature (cryptographic hash).
Inspect the registered claims section to view human-readable date translations for exp (expiration), nbf (not before), and iat (issued at) along with a live expiration countdown badge.
To verify an HMAC signature (HS256, HS384, HS512), enter your shared secret key into the signature verification panel and trigger the Web Crypto validation check.
Review the automated security analysis panel for critical vulnerability alerts, such as the dangerous alg: none exploit, weak signature algorithms, or clock drift.
Adjust the clock tolerance leeway (in seconds) if validating tokens across distributed servers with slight clock synchronization offsets.
Use developer keyboard shortcuts like ⌘↵ to decode, ⌘⇧V to verify signature, ⌘⇧C to copy payload JSON, or ⌘⇧K to clear the editor.
Copy the formatted JSON payloads directly or generate a secure gzip-compressed shareable URL for collaborative team debugging.
JWT Decoder Features
Instant RFC 7519 Token Decomposition: Decodes Header, Payload, and Signature segments simultaneously with structured syntax highlighting.
Registered Claims Analyzer: Automatically translates Unix timestamps into human-readable local and UTC datetimes for iss, sub, aud, exp, nbf, iat, and jti.
Live Expiration & Countdown Tracker: Visual color-coded badge indicators displaying token status (Active, Expired, Not Yet Valid, or Immortal) with real-time countdown.
Client-Side Web Crypto HMAC Verification: Verify HS256, HS384, and HS512 signatures locally in browser memory without transmitting secret keys across the network.
Automated Security Vulnerability Detection: Scans tokens for common vulnerabilities including alg: none attacks, missing expiration claims, and weak signing algorithms.
OAuth 2.0 & OpenID Connect (OIDC) Support: Specialized claim recognition for scope, roles, client_id, nonce, at_hash, auth_time, acr, and amr.
Configurable Clock Skew Tolerance: Set custom clock leeway in seconds to debug timestamp validation issues across distributed microservice architectures.
JWE Encrypted Token & Nested JWT Detection: Intelligently detects 5-segment JSON Web Encryption (JWE) tokens and nested tokens (cty: JWT).
Token Structure & Byte Size Visualizer: Visual breakdown showing the exact byte distribution and percentage footprint of Header, Payload, and Signature.
Hexadecimal Signature Export: Inspects and extracts the raw cryptographic signature bytes formatted as clean hexadecimal strings.
One-Click JSON Copy & Formatting: Prettifies decoded header and payload objects with one-click clipboard copying (⌘⇧C).
Gzip-Compressed Shareable Links: Encodes token states into URL hash fragments for zero-server sharing and peer code reviews.
100% Client-Side Privacy Guarantee: All parsing and Web Crypto HMAC operations run completely inside your browser with zero server data transfer.
Headless REST API Endpoint: Programmatically parse and validate JWTs in automated testing pipelines via HTTP POST /api/tools/jwt-decoder.
Supported Formats & Dialects
The JWT Decoder supports 6 syntax formats and dialects for accurate parsing and processing.
- RFC 7519 JSON Web Token (JWT) Standard
- The core IETF specification defining compact, URL-safe security tokens containing Base64URL-encoded header, payload, and signature segments joined by literal dots (header.payload.signature).
- HMAC Symmetric Signing (HS256, HS384, HS512)
- Symmetric cryptography utilizing a shared secret key with SHA-256, SHA-384, or SHA-512 hashing. Both the token issuer and consumer share the same secret for signing and verification.
- Asymmetric RSA & ECDSA Signatures (RS256, ES256, PS256)
- Public-key cryptography where the auth server signs tokens with a private key (PEM format) and API consumers verify signatures using the public key or JSON Web Key Sets (JWKS).
- OAuth 2.0 & OpenID Connect (OIDC) Claims
- Identity and authorization standard claims including user identifiers (sub), issuer URL (iss), audience resource servers (aud), authorization scopes (scope), and authentication nonces (nonce, at_hash).
- RFC 7516 JSON Web Encryption (JWE) 5-Segment Format
- Encrypted JWT standard composed of 5 segments: Protected Header, Encrypted Key, Initialization Vector (IV), Ciphertext, and Authentication Tag. Requires private decryption keys to read the payload.
- Base64URL Unpadded Encoding (RFC 4648 §5)
- URL-safe binary-to-text encoding replacing + with - and / with _, omitting trailing = padding so tokens pass safely within HTTP Authorization headers, query strings, and cookies.
In-Depth Technical Guides
All Guides.env File Formatting & Escaping: Multiline Secrets, Quotes & 12-Factor Config
Master .env formatting rules, resolve multiline string and certificate escaping bugs, manage .env precedence, and prevent secret leaks in CI/CD.
Cryptographic Hash Functions in Modern Web Architecture: SHA-2, SHA-3, BLAKE2 & HMAC Guide
Master cryptographic hashing: evaluate collision resistance, benchmark SHA-2 vs SHA-3 vs BLAKE2, prevent length extension attacks with HMAC, and safely verify file checksums.
Debugging JWT Errors: Fixing Signature Verification, Expiration & JWKS Failures
A comprehensive developer debugging guide to resolving JSON Web Token (JWT) errors: signature mismatches, expired tokens, alg: none attacks, clock skew, and JWKS key rotation.
Mastering Number Base Conversions: Binary, Hex, Two's Complement & IEEE 754 Floating Point
A comprehensive developer guide to positional numeral systems, arbitrary-precision BigInt radix conversions, two's complement signed arithmetic, and IEEE 754 float inspection.
Modern Cookie Security & CSRF Prevention: SameSite, __Host- Prefixes & CHIPS
Implement bulletproof browser cookie security with SameSite=Lax/Strict, enforce host binding via __Host- and __Secure- prefixes, prevent CSRF attacks, and configure CHIPS for cross-site embeds.
Modern Password Hashing in 2026: Argon2id vs bcrypt vs PBKDF2 & OWASP Security Standards
Benchmark memory-hard Argon2id against bcrypt and PBKDF2, configure work factors for modern GPU resistance, avoid the 72-byte bcrypt truncation trap, and implement seamless on-login hash upgrades.
Prompt Injection Scanning: A Practical Security Checklist
A developer security guide to identifying direct, indirect, and multi-turn prompt injection vulnerabilities in LLM applications and agent pipelines.
Related Standards & RFC Specifications
All StandardsBase64 is a binary-to-text encoding algorithm that converts binary data into an ASCII string using 64 printable characters as defined in RFC 4648.
A JSON Web Token (JWT) is a compact, URL-safe open standard (RFC 7519) used to securely transmit verifiable claims between distributed web services.
JWT claims are statements about an entity (typically a user) and additional metadata serialized as key-value pairs inside a JSON Web Token payload.
OAuth 2.0 (RFC 6749) is the industry-standard authorization protocol that enables third-party applications to obtain scoped access to HTTP resources on behalf of a user.
A passkey is a digital credential built on WebAuthn and FIDO2 standards that replaces passwords with synchronized, phishing-resistant asymmetric cryptographic keypairs.
PKCE (RFC 7636) is an OAuth 2.0 security extension that protects public and confidential clients against authorization code interception attacks using SHA-256 challenges.
Prompt injection is an AI security vulnerability where untrusted inputs subvert system instructions, leading to data exfiltration, jailbreaks, or unauthorized tool calls.
A Unix timestamp represents elapsed seconds since the Unix Epoch (January 1, 1970 00:00:00 UTC), serving as the universal standard for date-time representation.
WebAuthn is a browser API that enables public-key cryptographic authentication, powering phishing-resistant passwordless sign-ins and passkeys.
Explore Full AI Model Pricing Directory
Compare per-token rates, prompt caching discounts, and context windows across leading LLMs (GPT-4o, Claude 3.5 Sonnet, Gemini 2.5 Flash, DeepSeek, and more) in our verified catalog.
Pre-built Automation Pipelines
Chain JWT Decoder with other utilities in a multi-step visual workflow.
JWT Decoder
Decode and inspect JWT tokens.
URL Decode → JWT Inspect
Safely decode URL-encoded JWT tokens for inspection.
Example Input & Output
Sample ReferenceInteractive Example: JWT Decoder in ActionShow example
Sample Input (json)
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5cSample Output
HEADER:
{
"alg": "HS256",
"typ": "JWT"
}
PAYLOAD:
{
"sub": "1234567890",
"name": "John Doe",
"iat": 1516239022
}What happened:
Decodes JWT header, payload claims, and checks expiration timestamps without transmitting private tokens.
Error Diagnostics & Triage Guides
All Debug GuidesTokenExpiredError: jwt expired
The current Unix timestamp exceeds the numeric value defined in the JWT exp (expiration) claim. Token verification libraries strictly reject expired credentials to prevent replay attacks.
JsonWebTokenError: invalid signature / algorithm mismatch
The cryptographic signature in the third segment of the JWT does not match the computed hash of the header and payload using the provided verification key. This commonly happens when symmetric HS256 secrets are mistakenly used against asymmetric RS256 public keys.
JsonWebTokenError: jwt malformed
The provided string cannot be split into three period-separated Base64URL segments (header.payload.signature). This frequently happens when "Bearer " prefix is included in the verification call or undefined is passed.
Frequently Asked Questions
- How does the 3-segment structure of a JSON Web Token (JWT) work under RFC 7519?
- Under the RFC 7519 specification, a JSON Web Token consists of three distinct Base64URL-encoded JSON segments separated by periods: Header, Payload, and Signature (header.payload.signature). The Header specifies the cryptographic signing algorithm (such as HS256 or RS256) and token type. The Payload contains the claims—statements about the authenticated entity (user ID, roles, permissions) and metadata. The Signature is calculated by hashing the encoded Header and Payload together with a secret or private key, allowing backend services to verify data integrity and prevent tampering.
- What is the difference between symmetric (HS256) and asymmetric (RS256/ES256) JWT signing?
- HS256 (HMAC with SHA-256) is a symmetric algorithm where the exact same shared secret key is used both by the auth server to sign the token and by API services to verify it. This is fast and simple for monolithic systems, but requires sharing the secret with every microservice. RS256 (RSA) and ES256 (ECDSA) are asymmetric algorithms using a public/private key pair: the authentication server keeps the private key confidential to mint tokens, while any number of microservices or third-party APIs can freely verify tokens using the public key or JWKS endpoint without security risk.
- What are the RFC 7519 registered claims (iss, sub, aud, exp, nbf, iat, jti) and how should they be validated?
- RFC 7519 defines seven standard registered claims: iss (Issuer identifies the auth provider), sub (Subject identifies the user or service principal), aud (Audience identifies intended recipient API servers), exp (Expiration time Unix timestamp after which the token must be rejected), nbf (Not Before Unix timestamp before which the token must be rejected), iat (Issued At timestamp), and jti (JWT ID unique nonce to prevent replay attacks). Servers must validate that exp is in the future, nbf/iat are in the past, and iss/aud match the expected service identifiers.
- What is the critical alg: "none" vulnerability and how do you protect against algorithm confusion?
- The alg: "none" vulnerability occurs when poorly configured JWT verification libraries accept unsigned tokens where the header declares alg: "none" and the signature segment is stripped. Malicious actors can forge admin privileges by modifying the payload. A related attack is algorithm confusion, where an attacker signs a token using the server's public RS256 key as an HMAC secret key for HS256. To prevent these vulnerabilities, backend servers must strictly enforce an explicit whitelist of allowed algorithms (e.g. algorithms: ['RS256']) and reject dynamically inferred algorithms from untrusted headers.
- How should clock skew and time drift be handled when validating JWT expiration (exp) and not-before (nbf)?
- In distributed architectures, server clocks across different cloud hosts, identity providers, and API gateways can drift by several seconds. If a token is issued with iat = T and reaches a server whose clock is 2 seconds behind, strict validation would reject the token as not-yet-valid. Production JWT libraries solve this by introducing a configurable clock tolerance or leeway (typically 10 to 30 seconds) when comparing current time against exp, nbf, and iat claims.
- Where should JWTs be stored in client-side web applications: HttpOnly Cookies vs LocalStorage?
- Storing JWT access tokens in browser localStorage or sessionStorage leaves them vulnerable to Cross-Site Scripting (XSS) attacks, as any injected JavaScript script can read storage and exfiltrate tokens. The recommended security practice for web applications is storing tokens in HttpOnly, Secure, SameSite=Strict (or Lax) cookies, which browser JavaScript cannot access. For single-page apps (SPAs), storing short-lived access tokens (5–15 min) in memory variables combined with HttpOnly refresh cookies provides optimal defense in depth.
- How does client-side HMAC signature verification work in this tool without compromising secret keys?
- This tool executes HMAC signature verification (HS256, HS384, HS512) 100% locally in your browser using the native W3C Web Crypto API (crypto.subtle.importKey and crypto.subtle.sign). When you provide a secret key, the tool hashes the header and payload segments locally and compares the resulting digest with the signature segment using timing-safe byte comparison. Neither your token nor your secret key is ever transmitted to an external server or saved in persistent storage.
- What is the difference between a JWS (Signed JWT) and a JWE (Encrypted JWT)?
- A standard JSON Web Signature (JWS) is signed to ensure authenticity and integrity, but its header and payload are plain Base64URL-encoded text readable by anyone who inspects the token. In contrast, a JSON Web Encryption (JWE) token encrypts the payload using symmetric content encryption keys wrapped with public keys, producing 5 dot-separated segments. JWE guarantees both tamper-resistance and payload confidentiality, ensuring private user data cannot be read without the private decryption key.
- How do JSON Web Key Sets (JWKS) and Key ID (kid) rotation work in OAuth 2.0 and OIDC?
- Identity providers (such as Auth0, Okta, Google, and Supabase) publish their public signing keys as a JSON Web Key Set (JWKS) at a well-known URL (/.well-known/jwks.json). When minting tokens, the provider includes a kid (Key ID) header claim. Consuming APIs inspect the kid, locate the matching public key from their local JWKS cache, and verify the RSA or ECDSA signature. If an unknown kid is encountered during key rotation, the verification service fetches an updated JWKS from the auth provider.
- How can you safely revoke or invalidate a stateless JWT before its expiration date?
- Because stateless JWTs are validated without database queries, immediate revocation requires dedicated architectural patterns: 1) Short Token Lifetimes: Issue access tokens with 5–15 minute lifetimes and use refresh token rotation; 2) Distributed Revocation List: Maintain a Redis blacklist of revoked jti (JWT ID) identifiers with a TTL matching the token remaining lifespan; 3) User Epoch / Token Versioning: Include a tokenVersion number in the payload and increment the user's database version on logout or password change to invalidate older tokens.
Related Developer Tools
- Base64 Encode/DecodeEncode and decode Base64 strings, files, and data URIs instantly.
- JSON FormatterPrettify, minify, and validate JSON data instantly.
- Hash GeneratorGenerate and verify cryptographic hashes with multiple algorithms.
- Password GeneratorGenerate secure passwords, passphrases, and PINs with real-time strength analysis.
- URL Encoder/DecoderEncode, decode, and parse URLs and query strings instantly.
- Timestamp ConverterConvert between Unix timestamps, ISO 8601, and human-readable dates instantly.
- SSL/TLS Certificate DecoderDecode PEM & X.509 certificates offline or inspect live SSL/TLS certificate chains with expiration countdowns and health checks.
- cURL to Code ConverterConvert cURL commands to idiomatic code across 14 programming languages instantly.
- API Request BuilderBuild and test HTTP API requests with headers, body, auth, and response visualization.
- JSON to TypeScript & Schema GeneratorGenerate TypeScript interfaces, Zod schemas, and Valibot schemas from JSON.
- UUID GeneratorGenerate, validate, and decode UUIDs, ULIDs, and Nano IDs instantly.
- HTTP Headers AnalyzerAnalyze HTTP response headers for security, caching, and compliance issues.