Free Developer Tool — 100% Client-Side

JWT Decoder

Decode and inspect JWT tokens — view header, payload, and signature information instantly.

Sponsored
Advertisement

What Is JWT?

JWT (JSON Web Token) is an open standard (RFC 7519) for securely transmitting information between parties as a JSON object. A JWT is digitally signed, meaning it can be verified and trusted. Our free JWT decoder online lets you inspect the contents of any JWT token without sending it to a server.

Structure of a JWT

A JWT consists of three parts separated by dots: header.payload.signature

Header

Contains the token type and signing algorithm (e.g., HS256, RS256).

Payload

Contains the claims — statements about an entity and additional data. Standard claims include sub, iat, exp.

Signature

Verifies the token hasn't been tampered with. Created by signing the encoded header and payload with a secret key.

What Is Base64Url Encoding?

JWT uses Base64Url encoding, which is a URL-safe variant of Base64. Unlike standard Base64, it uses - instead of + and _ instead of /, and omits padding = characters. This JWT payload decoder automatically handles this encoding when decoding tokens.

Common JWT Use Cases

  • Authentication — Users receive a JWT after logging in, which they send with each request to verify their identity.
  • API Authorization — Backend services use JWTs to authorize access to protected API endpoints.
  • SaaS Sessions — SaaS platforms use JWTs to maintain session state across distributed microservices.
  • Single Sign-On — SSO protocols like OpenID Connect use JWTs to transmit identity information.
  • Password Reset — Time-limited JWTs encode password reset tokens with expiration claims.

Is JWT Secure?

JWT tokens are signed, not encrypted. The header and payload are Base64Url-encoded, not encrypted — anyone with the token can decode and read them. Never put sensitive data in a JWT payload. The signature ensures the token hasn't been modified, but it does not protect the contents from being viewed. Our JWT token decoder shows exactly what data is visible in any JWT.

JWT Token Example

Encoded JWT

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c

Decoded Header

{"alg":"HS256","typ":"JWT"}

Decoded Payload

{"sub":"1234567890","name":"John Doe","iat":1516239022}
Sponsored
Advertisement
Technical Documentation & Standards

Technical Specifications & Standards JSON Web Token (JWT) is an open, compact, and URL-safe industry standard for securely representing claims between two parties, defined by RFC 7519. Widely utilized in modern web authentication, Single Sign-On (SSO), and microservice authorization architectures (OAuth 2.0 and OpenID Connect), a JWT is serialized as a string consisting of three distinct base64url-encoded JSON objects separated by periods (.): - Header: Specifies the token type ('typ': 'JWT') and the cryptographic signing algorithm ('alg', such as HS256 for HMAC-SHA256, RS256 for RSA, or ES256 for ECDSA), standardized by RFC 7515 (JSON Web Signature). - Payload: Contains the 'claims'—statements about an entity (typically the user) and additional metadata. RFC 7519 defines standard registered claims: 'iss' (issuer), 'sub' (subject/user ID), 'aud' (audience), 'exp' (expiration timestamp), 'nbf' (not before), 'iat' (issued at), and 'jti' (JWT ID), alongside application-specific custom claims. - Signature: Computed by hashing the encoded header and payload with a secret key or private key to ensure message integrity.

How It Works in Your Browser WebUtil's JWT Decoder operates completely inside your client browser. When a JWT string is supplied, the tool splits the string by period delimiters. The header and payload segments are decoded from Base64URL encoding into raw UTF-8 JSON strings. The tool formats the JSON payloads with syntax highlighting, parses standard registered claims, converts Unix epoch timestamps (such as 'exp' and 'iat') into human-readable UTC and local date formats, and evaluates whether the token is currently valid or expired based on your computer's local clock.

Developer Guide & Common Pitfalls Decoding and managing JWTs in web applications requires strict adherence to security protocols: - Decoding vs Verifying: Decoding a JWT simply reveals the data inside the header and payload. It DOES NOT prove the token was issued by a trusted server or that it has not been tampered with. Only cryptographic signature verification using the issuer's public key or shared secret proves authenticity. - The 'alg': 'none' Vulnerability: In early JWT implementations, attackers could alter the header to set 'alg': 'none' and strip the signature, tricking naive backends into accepting unsigned tokens. Modern libraries strictly forbid this. - Sensitive Data in Payloads: JWT payloads are encoded, NOT encrypted (unless using JSON Web Encryption, RFC 7516). Anyone who inspects the token can read all claims. Never place passwords, credit card numbers, or sensitive secrets in a JWT payload. - Storing Tokens in Web Browsers: Storing JWTs in localStorage exposes them to Cross-Site Scripting (XSS) theft. Storing them in HttpOnly, Secure, SameSite cookies is the security standard for web sessions.

Zero-Knowledge Privacy & Security Assurance Authentication tokens contain live session permissions, user IDs, email addresses, and corporate roles. Pasting live JWTs into untrusted online decoders risks leaking credentials to third parties. WebUtil decodes JWTs 100% locally in your browser tab. Your tokens never leave your device.

Enterprise Protocol Diagnostics & Schema Validation Enterprise integration protocols like SOAP web services, Electronic Data Interchange (EDI), and healthcare HL7 XML feeds rely on strictly validated structures. When troubleshooting integration failures, minified XML payload strings obscure namespace scope mismatches and unclosed tags. Beautifying XML with syntax indentation accelerates debugging, facilitates schema validation against XSD files, and prevents XML External Entity (XXE) vulnerabilities during system integration.

How to Do This in Code

Deploy Your Next Project Fast

Get $200 free credit on DigitalOcean to deploy your apps with blazing-fast infrastructure.

JWT Decoder FAQ

Can a JWT be decoded without knowing the secret signature key?

Yes. Standard JWTs (JWS) are signed, not encrypted. The header and payload are Base64URL-encoded JSON strings that anyone can decode and read without the signing secret.

What is the difference between a JWT header, payload, and signature?

The Header specifies metadata and the signing algorithm (e.g. RS256). The Payload contains the claims and data (user ID, expiration, roles). The Signature cryptographically verifies that the token was not modified after issuance.

What are standard JWT registered claims (iss, sub, aud, exp, iat)?

Standard claims include: iss (issuer), sub (subject/user ID), aud (audience/intended recipient), exp (expiration timestamp), nbf (not before timestamp), and iat (issued-at timestamp).

What is the 'alg: none' JWT vulnerability?

It is a severe security vulnerability where flawed authentication libraries accept tokens that specify 'none' as their algorithm, bypassing signature verification entirely.

Is it safe to paste production authentication tokens into WebUtil?

Yes. WebUtil runs 100% client-side in your browser. No tokens, claims, or telemetry are ever sent across the network.

Where should JWT tokens be stored securely in web applications?

For web applications, storing JWTs in httpOnly, secure, sameSite cookies protects them from XSS attacks. Avoid storing sensitive tokens in localStorage or sessionStorage.