Tool overview
JWT 디코더이란?
JWT 디코더은(는) JSON Web Token 디코딩 및 검사 위한 개발자 도구입니다.
왜 JWT 디코더을(를) 사용하나요?
JSON Web Token 디코딩 및 검사할 때 가독성과 작업 속도를 높이며 서버로 데이터를 보내지 않습니다.
주요 기능
클라이언트 사이드 프라이버시, 즉시 결과, 원클릭 복사. JSON Web Token 디코딩 및 검사
사용 방법
위 도구에서 정확한 결과를 얻기 위한 단계입니다.
- JWT 디코더을(를) 열고 상단 패널에 입력을 붙여넣거나 불러옵니다.
- 도구 모음으로 출력을 처리, 복사 또는 지웁니다.
- UI의 검증 메시지를 확인하고보내기 전에 오류를 수정합니다.
JWT 디코더 기술 참조
이 유틸리티의 유효한 예시, 흔한 잘못된 입력, 자주 발생하는 오류를 확인하세요.
JWT Decoder guide — start here
This page is the canonical guide to inspecting JSON Web Tokens with DevUtilities’ JWT Decoder. Use the decoder above while you read, or jump to a topic below. Header and payload decoding runs entirely in your browser — tokens are never uploaded for verification or analytics.
What JWT Decoder does
JWT Decoder is a client-side inspector for compact JWS tokens (header.payload.signature). It Base64URL-decodes the first two segments, JSON-parses claims, and surfaces alg, typ, exp, nbf, iat, sub, and custom fields for debugging — without treating a successful decode as cryptographic proof.
What you get
- Three-segment split with structured header and payload JSON
- Visibility into registered claims (exp, nbf, iat, iss, aud, sub) and custom claims
- Clear separation between decode (this tool) and signature verification (your backend / JWKS)
- Local-only processing suitable for staging tokens and redacted production samples
Use this decoder when
- You need to see why an API returns 401 despite a “valid-looking” token
- You are comparing claim sets across environments during key rotation
- You want to confirm Base64URL segments before wiring a verifier
- You are teaching or documenting JWT shape without pasting secrets into a third-party site
Do not expect
- HMAC, RSA, or ECDSA signature verification — this tool is decode-only
- Automatic clock skew handling against a trusted NTP source
- JWKS fetch or issuer trust decisions
Decode vs verify — know the difference
Decoding proves only that segments are well-formed Base64URL JSON. Verification proves the signature matches a trusted key and that time/audience constraints pass. Confusing the two is a common auth bug.
Decode (this tool)
- Splits on '.' and requires three parts for compact JWS
- Base64URL-decodes header and payload, then JSON.parse
- Shows claims even when the signature is wrong, expired, or alg is none
Verify (your secure backend)
- Checks alg against an allowlist — never trust header.alg blindly
- Validates HMAC/RSA/ECDSA with issuer secret or JWKS public key
- Enforces exp, nbf, iss, aud, and optional jti replay controls
Step-by-step: inspect a compact JWT
Walk through a typical debug session with the decoder above.
- Copy the raw JWT only — strip Bearer prefixes, quotes, and trailing newlines from logs.
- Paste into the input panel; the tool splits header.payload.signature automatically.
- Read the header: confirm alg and typ match what your issuer is supposed to emit.
- Read the payload: check sub, roles/scopes, exp, nbf, and any tenant or environment claims.
- Compare exp and nbf to Math.floor(Date.now()/1000) in UTC if APIs reject the token.
- If claims look correct but APIs still fail, move to signature verification in your backend — do not assume decode equals trust.
- Clear the editor (and localStorage if used) after inspecting production-like tokens on shared machines.
Use case: debug intermittent 401s
Problem: a mobile client receives intermittent 401s. Logs show a JWT that “looks fine” in the network tab, but the API gateway rejects it.
How this tool helps
- Paste the failing token and confirm three segments decode without structure errors.
- Check alg — unexpected none, HS256 vs RS256 mismatches, or typ typos often explain gateway rejects.
- Inspect exp and nbf against UTC; clock skew and timezone bugs are frequent on devices.
- Compare custom claims (tenant, env, scope) to what the gateway policy expects.
- Hand the same token to your verifier with the correct JWKS/secret once claims look right.
Outcome: you separate malformed tokens, claim/policy mismatches, and true signature failures before changing client code blindly.
Use case: inventory access-token claims
Problem: product asks which claims ship in the access token after a new OIDC mapping. Docs are stale; you need a live sample.
How this tool helps
- Obtain a non-production access token from the staging authorize flow.
- Decode and list registered vs custom claims in the payload JSON.
- Note claim names and types (string vs number for NumericDate fields).
- Document the claim contract for API authors without sharing the signature secret.
Outcome: a concrete claim inventory for design docs — still remembering the token is not verified here.
Use case: signing-key rotation checklist
Problem: you are rotating signing keys. Some services still mint tokens with the old kid; others already use the new JWKS entry.
How this tool helps
- Decode tokens from each issuer path and record header.kid and alg.
- Confirm payload iss/aud still match during the dual-publish window.
- Flag tokens missing kid or using unexpected alg before cutting over verifiers.
- After cutover, spot-check that new tokens no longer reference the retired kid.
Outcome: a claim/header checklist for rotation — signature proof still happens in services that hold keys.
Fix: alg none and algorithm confusion
alg:none (or accepting arbitrary alg from the header) is a classic JWT attack against misconfigured libraries.
Why it happens
Some early libraries treated alg:none as “unsigned but valid,” or allowed attackers to switch RS256 tokens to HS256 and verify with the public key as an HMAC secret.
Diagnose
Decode the header. If alg is none, empty, or not on your allowlist, treat the token as hostile regardless of a pretty payload.
Fixes
- Configure verifiers with an explicit algorithm allowlist (e.g. only RS256 or only ES256).
- Reject tokens whose header.alg is none or missing.
- Never derive the verify algorithm solely from untrusted header input.
- Prefer asymmetric algorithms with JWKS rotation for public clients.
This decoder will still show the payload for alg:none tokens — visibility is not endorsement. Reject them in production verifiers.
Fix: exp / nbf time failures
APIs often return 401 when exp has passed or nbf is still in the future, even though the token decodes cleanly.
Why it happens
NumericDate claims are seconds since Unix epoch. Clients may compare milliseconds, apply local timezone offsets, or ignore clock skew windows.
Diagnose
Decode exp and nbf as JSON numbers. Compare to Math.floor(Date.now()/1000). String exp values or millisecond timestamps are malformed per RFC 7519.
Fixes
- Normalize comparisons to UTC seconds; allow a small skew (e.g. 30–60s) on both sides if policy permits.
- Ensure issuers emit NumericDate numbers, not ISO strings.
- Check device clock sync when only mobile clients fail.
- Confirm nbf is not set far in the future after a bad deploy.
Fix: Base64URL vs standard Base64
JWT segments use Base64URL (RFC 4648 §5): - and _ instead of + and /, with padding often omitted.
Why it happens
Pasting standard Base64, adding = padding incorrectly, or mixing alphabets breaks decode. Truncated copy-paste drops the signature segment.
Diagnose
Look for +/ in segments, spaces, Bearer prefixes, or fewer than three dot-separated parts. Valid JWT segments should be URL-safe.
Fixes
- Strip Bearer and whitespace before paste.
- Re-copy the full three-part token from the source — do not re-encode with standard Base64 tools unless you convert to Base64URL.
- When building tokens, use Base64URL without relying on atob/btoa alone for binary safety.
JWT segment & claim reference
Quick reference for compact JWS shapes and common pitfalls. Decoding success ≠ verification success.
JWT segment & claim reference
| Token / claim | Valid shape | Malformed / risky | Pitfall |
|---|---|---|---|
| Compact JWS | header.payload.signature (3 parts) | Two parts or Bearer-prefixed paste | Missing signature segment is a common log truncation issue |
| Header alg | Allowlisted alg (e.g. RS256) | alg:"none" or attacker-controlled alg | Never trust header.alg alone in verifiers |
| exp / nbf | JSON number (UTC seconds) | ISO string or milliseconds | Wrong type breaks library comparisons |
| Segment encoding | Base64URL (-_ , padding optional) | Standard Base64 (+/) | Wrong alphabet indicates corrupt paste or wrong encoder |
Security checklist
- Treat decode-only output as untrusted until a backend verifies the signature.
- Reject alg:none and unexpected algorithms in production.
- Do not paste long-lived refresh tokens on shared kiosks; clear local state afterward.
- Redact PII in screenshots of decoded payloads before sharing.
- Keep signing secrets and private keys out of browser workflows — use JWKS on the server.
JWT debugging best practices
- Document the claim contract (names, types, lifetimes) separately from verification code.
- Prefer short-lived access tokens; put sensitive authorization in server sessions when possible.
- Log kid and iss during incidents — not full tokens — when retention policies allow.
- Use this decoder for shape and claims; use automated tests against a real verifier for security gates.
- During key rotation, dual-publish JWKS and monitor kid distribution before retiring keys.
Privacy — tokens stay local
All Base64URL decoding and JSON parsing run in your browser. Tokens are not sent to a verification endpoint, JWKS proxy, or analytics pipeline from this utility.
- Optional localStorage persistence (if enabled by the workspace) stays on your device origin only.
- Decoded payloads may contain PII — handle output like sensitive logs.
- Clear the editor after debugging production-like tokens.
자주 묻는 질문
일반적인 문제와 데이터 프라이버시에 대한 답변입니다.
공식 문서 및 참고 자료
이 유틸리티의 공식 사양 및 플랫폼 문서입니다.