인코딩
JWT Encoder/Decoder
JWT 토큰 인코딩 및 디코딩 — 헤더, 페이로드, HMAC 서명, 표준 클레임.
서명된 예제(none 제외)는 HTTPS가 필요합니다 — 현재 페이지가 HTTPS 없이 열려 있습니다.
RS/PS/ES의 경우 키가 자동으로 임시 생성됩니다 — 데모용일 뿐 재사용할 수 없습니다.
서명된 예제(none 제외)는 HTTPS가 필요합니다 — 현재 페이지가 HTTPS 없이 열려 있습니다.
Claims
A JWT (JSON Web Token) is a compact format for transmitting signed data, made of three dot-separated parts: a header, a payload, and a signature. This tool decodes any JWT and shows all three parts, and can also build a new token signed with HMAC.
Decoding does not verify the signature — reading a token's contents needs no secret key. Verifying the signature only matters when you need to trust the token as genuine.
How to use it
- Decode: paste a JWT and the tool splits it into header, payload, and signature, highlighting standard claims like exp, iat, and sub.
- Encode: fill in the header and payload, provide a secret, and get a signed HMAC token (HS256/HS384/HS512) back.
- Check expiry: the exp claim is shown as a normal date, so you can immediately tell if a token has expired.
Common uses
- Debugging authentication issues by inspecting exactly what a request's token contains.
- Checking which claims (roles, permissions, expiry) your backend issues.
- Generating a test token for local development without running an auth server.
Things to keep in mind
A JWT is not encrypted, only Base64URL-encoded — anyone can read the payload. Never put passwords or other secrets in it.
The signature protects against tampering, not against being read. For confidentiality you need extra encryption (JWE) or an HTTPS transport.
자주 묻는 질문
JWT를 디코딩하면 서명도 검증되나요?
아니요. 디코딩은 Header와 Payload에 담긴 클레임을 base64url 디코딩해서 보여줄 뿐이며, secret이나 공개키를 입력하지 않으면 서명이 진짜인지는 검증하지 않습니다. 즉 토큰 내용을 볼 수는 있어도 그 자체로 위조 여부를 증명하지는 못합니다.
이 도구에 secret이나 키를 입력해도 안전한가요?
네, 모든 인코딩·디코딩·서명 검증 로직은 브라우저 안에서만 실행되며 secret, 키, 토큰 어느 것도 서버로 전송되지 않습니다. 다만 실제 운영 환경의 secret은 가급적 별도로 관리하는 것이 좋습니다.
exp, iat 같은 표준 클레임은 어떻게 해석하나요?
exp는 토큰 만료 시각, nbf는 이 시각 이전에는 유효하지 않음, iat는 발급 시각을 나타내며 모두 유닉스 타임스탬프(초)입니다. 이 도구는 exp를 현재 시각과 비교해 유효/만료 상태를 함께 보여줍니다.
알고리즘을 "none"으로 바꿔치기하는 공격이란 무엇인가요?
백엔드가 토큰 헤더의 alg 필드를 순진하게 신뢰하면, 공격자가 이를 none으로 바꿔 서명을 제거할 수 있고 임의의 데이터를 담은 토큰이 검증을 통과해버립니다. 신뢰할 수 있는 라이브러리는 검증 시 기대하는 알고리즘을 명시적으로 지정하도록 요구합니다.
민감한 세션에 JWT를 localStorage에 저장하면 왜 안 좋은가요?
localStorage는 페이지의 어떤 JavaScript 코드에서든 접근 가능해 XSS에 취약합니다 — 악성 스크립트가 토큰을 훔칠 수 있습니다. 세션 토큰에는 JavaScript에서 접근할 수 없는 httpOnly 쿠키를 사용하는 것이 더 안전합니다.