JWT (JSON Web Token) 분석기

비밀 키를 외부로 전송하지 않고 JWT 토큰의 클레임과 페이로드를 안전하게 디코딩.

개발자 및 코드
100% 클라이언트 사이드 · 안전한 개인정보 보호
JWT (JSON Web Token) 분석기

비밀 키를 외부로 전송하지 않고 JWT 토큰의 클레임과 페이로드를 안전하게 디코딩.

개념 및 지식 허브

JSON Web Token (JWT) 디코더 및 페이로드 검증

JSON Web Token (JWT) 디코더 및 페이로드 검증

본 도구는 100% 클라이언트 환경(브라우저)에서 작동합니다. 소스 코드, 토큰, 기밀 데이터가 외부 서버로 절대 전송되지 않습니다.

핵심 아키텍처 및 수학 공식

JWT Structure = Base64Url(Header) . Base64Url(Payload) . Signature

The Token consists of three distinct parts separated by dots. The Header defines the algorithm (e.g., HS256), the Payload contains the user claims, and the Signature cryptographically validates the data.

모범 사례 및 필수 지침

  • Never Store Secrets in the Payload: The JWT payload is merely Base64 encoded, not encrypted. Anyone can decode it. Never store passwords, social security numbers, or API keys inside the token payload.
  • Enforce Short Expirations (EXP): Stateless JWTs cannot be easily revoked once issued. Always set the 'exp' claim to 15 or 30 minutes, and use secure HttpOnly refresh tokens to issue new ones.
  • Validate the Signature on the Server: Decoding the payload on the frontend is fine for UI logic, but your backend API must cryptographically verify the signature using your secret key before trusting any data.

자주 묻는 질문 (FAQ)

Why is the JWT signature important?
The signature is generated using a secret key known only to your server. If a hacker manipulates the decoded payload (e.g., changing their role to 'admin'), the server will reject it because the signature will no longer match the altered data.
Can I decode a JWT without the secret key?
Yes. The Header and Payload are just Base64Url encoded strings. Anyone can decode and read them. You only need the secret key to verify the signature or to generate a new valid token.
What is the 'sub' claim?
The 'sub' (Subject) is a reserved standard claim intended to uniquely identify the user (usually a database User ID or UUID) that the token authenticates.