JWT Decoder
Decode and inspect JSON Web Tokens instantly. View header, payload, and expiration. Free, client-side, no signup.
Paste a JWT token and click Decode
How to Use
- Paste your JWT token into the input field (starts with
eyJ...). - Click Decode to view the header, payload, and signature.
- Timestamp fields (iat, exp, nbf) are automatically converted to human-readable dates.
- Click Sample to load an example JWT for exploration.
What Is a JWT?
JSON Web Tokens (JWTs, pronounced "jots") are an open standard (RFC 7519) for creating access tokens that assert claims. They are widely used for authentication and authorization in web applications, APIs, and microservices. A JWT allows a server to issue a self-contained token that clients can present to prove their identity without the server needing to look up session state.
JWT Structure
A JWT consists of three parts separated by dots (.):
Header — Contains the signing algorithm (e.g., HS256, RS256) and token type (JWT). This is Base64url-encoded JSON.
Payload — Contains the claims: data about the user or session. Standard claims include sub (subject), iat (issued at), exp (expiration), and iss (issuer). You can also include custom claims. This is also Base64url-encoded JSON.
Signature — Created by signing the encoded header and payload with a secret key (HMAC) or private key (RSA/ECDSA). The signature ensures the token has not been tampered with.
Common JWT Algorithms
- HS256 (HMAC-SHA256) — Symmetric: the same secret key signs and verifies. Simple but requires secure key sharing.
- RS256 (RSA-SHA256) — Asymmetric: a private key signs, a public key verifies. Ideal for distributed systems where verifiers should not have signing capability.
- ES256 (ECDSA-P256) — Asymmetric with smaller keys and signatures than RSA. Increasingly preferred for new systems.
- EdDSA (Ed25519) — Modern asymmetric algorithm with excellent performance and small signatures.
JWT Security Best Practices
- Always verify the signature server-side before trusting any claims
- Set short expiration times (15 minutes for access tokens) and use refresh tokens for longer sessions
- Never store sensitive data in the payload — it is encoded, not encrypted
- Validate the
iss(issuer) andaud(audience) claims to prevent token misuse across services - Use the
algheader carefully — always validate it matches your expected algorithm to prevent algorithm confusion attacks
JWTs in Code
In Node.js, the jsonwebtoken package provides jwt.sign() and jwt.verify(). In Python, use PyJWT: jwt.encode() and jwt.decode(). In Go, the golang-jwt/jwt package is the standard choice. Most frameworks (Express, Django, Spring) have JWT middleware for automatic token validation.
Related Tools
JWTs use Base64 encoding for header and payload. Signatures use SHA-256 hashing. Prettify payloads with the JSON Formatter. Convert JWT timestamp claims with the Epoch Converter. Validate JWT payload structure with the JSON Validator. Encode JWTs for URL parameters with the URL Encoder.
Frequently Asked Questions
- What is a JWT?
- A JSON Web Token (JWT) is a compact, URL-safe token format used for securely transmitting information between parties. It consists of three Base64url-encoded parts separated by dots: a header (algorithm and token type), a payload (claims/data), and a signature.
- Does this tool verify the signature?
- No. This tool decodes the header and payload, which are simply Base64url-encoded and not encrypted. Signature verification requires the secret key or public key, which should never be entered into a web tool. Use a server-side library for verification.
- Is it safe to paste my JWT here?
- Yes. All decoding happens entirely in your browser — no data is sent to any server. However, be aware that JWTs often contain sensitive information like user IDs and roles. Never share JWTs publicly or paste them into untrusted tools.
- What do iat, exp, and nbf mean?
- These are standard JWT claims representing timestamps in Unix epoch seconds. "iat" (Issued At) is when the token was created. "exp" (Expiration Time) is when the token expires. "nbf" (Not Before) is the earliest time the token should be accepted.
- Can JWTs be decrypted?
- Standard JWTs (JWS) are signed but not encrypted — the payload is Base64url-encoded and readable by anyone. JWE (JSON Web Encryption) tokens are encrypted, but they are less common. This tool handles standard signed JWTs.
Code Examples
Learn how to use this tool programmatically in your favorite language.
Use this tool from AI agents.
The CodeTidy MCP Server lets Claude, Cursor, and other AI agents
use this tool and 46 others directly. One command: npx @codetidy/mcp