Free JWT Decoder
Decode and inspect any JSON Web Token. View header, payload, expiration, and standard claims. Everything runs locally in your browser β tokens never leave your device.
π The token is decoded entirely in your browser. Nothing is sent to any server.
Common uses
- Debug Authentication Issues with JWT DecoderInspect JWTs from your app to debug login failures, permission issues, and token expiration problems.
- Inspect API Tokens While Testing EndpointsDecode JWTs returned by your API to verify the right claims, scopes, and permissions are being issued.
- Security Audit JWT TokensReview JWTs as part of a security audit β check for weak signing algorithms, excessive token lifetimes, or sensitive data in the payload.
- Inspect OAuth and OpenID Connect TokensDecode access tokens, ID tokens, and refresh tokens from Google, Auth0, Okta, Microsoft, and other OAuth providers.
- Learn How JWT Tokens WorkDecode example JWTs to understand the structure: header, payload, and signature. See real-world claim examples.
How It Works
The decoder is a hand-written, zero-dependency parser that runs entirely in your browser: it splits the token on dots, converts each Base64URL segment to plain Base64 using string replacement and pads it to a multiple of four, then calls the browser's native atob() and JSON.parse to recover the header and payload objects. Optional signature verification uses the Web Crypto API (crypto.subtle.verify) β no library, no server.
- 1Base64URL decodingThe tool splits the JWT on its two period delimiters, giving three segments. Each segment is Base64URL β which uses - and _ instead of + and / and omits padding. The code swaps those characters back and pads with = signs, then calls the browser's built-in atob() to decode the bytes.
- 2JSON parsing and claim extractionThe decoded bytes are passed through JSON.parse to produce the header and payload objects. Registered claims exp, iat, and nbf are extracted as Unix timestamps and converted to Date objects; expiry status is rechecked every 20 seconds via setInterval so a token that expires while the tab is open flips from valid to expired automatically. Relative timestamps ('in 3 days', '2 hours ago') are formatted with Intl.RelativeTimeFormat using your browser locale.
- 3Signature display and optional verificationThe raw Base64URL signature string is shown alongside the header and payload. If you supply a key, the tool calls crypto.subtle.importKey and crypto.subtle.verify to check the signature locally. It accepts HMAC shared secrets (HS256/384/512), PEM-encoded RSA public keys (RS256/384/512), and ECDSA public keys or JWK/JWKS objects (ES256/384/512) β determined by the alg field in the header.
- 4No network requestsEvery step β decoding, timestamp math, and cryptographic verification β runs inside the browser JavaScript engine. The token and any key material you enter never leave your device.
JWTs often carry session credentials, user identity, and authorization scopes; this tool decodes and optionally verifies them entirely in your browser using atob() and the Web Crypto API, so neither the token nor any key you supply is transmitted anywhere.
Related Tools
URL Encoder & Decoder
Encode and decode URLs and query strings. Supports encodeURIComponent, decodeURIComponent, and query string parsing.
UUID Inspector
Decode any UUID or ULID β see its version, variant, and the creation timestamp embedded in v1, v6, v7, and ULIDs. Runs entirely in your browser.
Base64 Encoder & Decoder
Encode text or files to Base64, or decode Base64 strings back to plain text. Instant, private, and free.