← Về trang chủ

JWT Decoder Online — Header, Payload, Signature

Decode JWT token: header (alg, typ), payload (claims), signature. Format exp/iat thành readable date + cảnh báo EXPIRED + giải thích common claims (iss, sub, aud, exp...).

DecodeClaimsEXP checkPrivacy
⚠️ Tool chỉ DECODE, không verify signature. Token paste vào không upload server.
Header
{
  "alg": "HS256",
  "typ": "JWT"
}
alg: HS256
Payload
{
  "sub": "1234567890",
  "name": "John Doe",
  "iat": 1516239022,
  "exp": 1900000000
}
exp: 3/18/2030, 12:46:40 AM
iat: 1/18/2018, 8:30:22 AM
Signature (raw)
SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
📚 Common claims explained
issIssuer — entity that issued the token
subSubject — whom the token refers to (user ID)
audAudience — intended recipients
expExpiration Time — Unix timestamp when token expires
nbfNot Before — Unix timestamp before which token is invalid
iatIssued At — Unix timestamp when token was issued
jtiJWT ID — unique identifier (replay prevention)
scopeOAuth scopes granted
roleUser role / authorization level
emailUser email
nameUser display name

Vì sao dùng tool này

🔒
Decode local

JWT token KHÔNG upload server. Decode bằng atob + JSON.parse trong browser. Safe cho production tokens.

📅
EXP/IAT formatted

Unix timestamps exp/iat/nbf convert thành readable date. Cảnh báo EXPIRED rõ ràng.

📚
Claims explained

11 common claims (iss, sub, aud, scope, role...) kèm giải thích — nhớ nhanh không cần đọc spec.

Cách sử dụng

  1. 1Paste JWT token (3 parts cách nhau bằng dấu chấm).
  2. 2Tool auto-decode header + payload + signature ngay khi paste.
  3. 3Xem alg, exp date, claims. Bấm 'Common claims explained' nếu cần ref.

JWT là gì?

JWT (JSON Web Token, RFC 7519) là format token compact, URL-safe để truyền claims giữa hệ thống. Cấu trúc: header.payload.signature — mỗi phần Base64url-encoded.

Header chứa alg (HS256, RS256...) + typ (JWT). Payload chứa claims (registered + custom). Signature verify integrity dùng secret hoặc keypair.

Tool này CHỈ decode (không verify signature) — verify cần server-side với secret/public key.

  • Decode header + payload + signature
  • Auto-format exp/iat/nbf timestamps
  • EXPIRED warning rõ ràng
  • 11 common claims explained
  • Base64url decoding (URL-safe)
  • Pretty JSON output cho header/payload
  • Copy individual fields

Câu hỏi thường gặp

Tool có verify signature không?

Không. Verify cần server secret (HMAC) hoặc public key (RSA/ECDSA) — không an toàn để đặt ở client. Dùng tool server-side hoặc jwt.io online verify.

Có support encrypted JWT (JWE)?

Không. Chỉ decode JWS (signed). JWE encrypt payload — cần private key để decrypt, không phù hợp client tool.

JWT alg=none decode được không?

Có. Header.payload.empty_signature → decode header + payload bình thường. Cảnh báo: alg=none thường là security bug.