JWT Decoder & Encoder
JWT Decoder & Encoder lets you decode, verify, and encode JSON Web Tokens in real-time. JWTs (RFC 7519) are the standard for authentication and authorization in modern web applications, used by OAuth 2.0, OpenID Connect, and countless APIs worldwide.
In decoder mode, paste a JWT to instantly see its header, payload, and signature. The tool auto-detects the signing algorithm and verifies the signature when you provide a key. Expiration status is checked and displayed automatically. In encoder mode, build JWTs from scratch with custom headers, payloads, and signing keys.
This tool supports all major JWT algorithms: HMAC (HS256, HS384, HS512), RSA (RS256, RS384, RS512), RSA-PSS (PS256, PS384, PS512), ECDSA (ES256, ES384, ES512), and EdDSA (Ed25519). Keys can be provided in PEM or JWK format for asymmetric algorithms.
All processing happens entirely in your browser β your tokens and keys never leave your device. Getting started? Read our JWT beginner's guide or review security best practices. Scroll down for algorithm details and documentation.
Decoded Header
Decoded Payload
Signature Verification
What is a JSON Web Token (JWT)?
A JSON Web Token (JWT, pronounced βjotβ) is a compact, URL-safe token format defined in RFC 7519. JWTs are widely used for authentication, authorization, and information exchange in modern web applications and APIs.
A JWT consists of three Base64url-encoded parts separated by dots: header, payload, and signature. The header specifies the signing algorithm and token type. The payload contains claims β statements about the user and metadata like expiration time. The signature ensures the token has not been tampered with.
How JWT Signatures Work
Symmetric algorithms (HS256, HS384, HS512) use a single shared secret for both signing and verification. They are simple and fast, making them suitable for internal services where both parties can securely share the key.
Asymmetric algorithms (RS256, RS384, RS512, ES256, ES384, ES512, PS256, PS384, PS512, Ed25519) use a private key to sign and a corresponding public key to verify. This is ideal for distributed systems where the verifier should not have signing capability β for example, an auth server signs tokens with its private key, and API servers verify them with the public key.
Standard JWT Claims
iss(Issuer) β who created the tokensub(Subject) β who the token represents (usually a user ID)aud(Audience) β the intended recipientexp(Expiration) β when the token expires (Unix timestamp)iat(Issued At) β when the token was creatednbf(Not Before) β the token is not valid before this timejti(JWT ID) β unique identifier for the token
Security Best Practices
- Always verify signatures on the server before trusting any claims.
- Check expiration β reject expired tokens to prevent replay attacks.
- Use strong secrets β for HMAC algorithms, use at least 256 bits of entropy.
- Validate the
algheader β never allow the βnoneβ algorithm in production. - Keep payloads small β JWTs are sent with every request; large tokens impact performance.
- Donβt store secrets in payloads β JWT payloads are Base64-encoded, not encrypted. Anyone can read them.
- Prefer short expiration times and use refresh tokens for long-lived sessions.
Common Use Cases
Authentication: After login, the server issues a JWT that the client sends with subsequent requests (typically in the Authorization: Bearer header). The server verifies the token instead of looking up a session in a database.
OAuth 2.0 & OpenID Connect: Access tokens and ID tokens are often JWTs. The ID token contains user profile claims, while the access token grants permissions to specific resources.
JWT vs. Session Cookies: Session cookies store a session ID on the server; JWTs are self-contained and stateless. JWTs scale better across multiple servers but cannot be individually revoked without additional infrastructure (token blocklists or short expiration with refresh tokens).
Supported Algorithms
This tool supports all major JWT signing algorithms: HMAC (HS256, HS384, HS512), RSA (RS256, RS384, RS512), RSA-PSS (PS256, PS384, PS512), ECDSA (ES256, ES384, ES512), and EdDSA (Ed25519). Keys can be provided in PEM or JWK format for asymmetric algorithms.