devtools5 min readUpdated on 2026-09-06

How to Decode a JWT Token (Header, Payload & Signature Explained)

JWTs look like random gibberish but contain readable data. Learn how to decode them instantly and understand the header, payload, and signature components.

Recommended Free Tool

Open JWT Decoder

Perform this task online in seconds with zero sign-up or watermarks.

Open JWT Decoder

How to Decode a JWT Token

Follow these simple step-by-step instructions:

1

Get your JWT token

JWT tokens start with 'eyJ' and consist of three parts separated by dots (.). You can find them in browser developer tools under Application → Cookies or Local Storage, in API responses, or in authorization headers.

Pro Tip: Look for strings starting with 'eyJ' in your browser's network tab under request/response headers.
2

Paste the token into the decoder

Paste the full JWT string into the input field. The decoder will automatically split it into its three components: header, payload, and signature.

Pro Tip: The decoder works entirely in your browser — your token is never sent to our servers.
3

Read the decoded payload

The payload section shows all the claims encoded in the token: user ID, email, roles, expiration time (exp), issued at (iat), and any custom claims your API adds.

Pro Tip: Check the 'exp' field — it contains the Unix timestamp of when the token expires.

What Is a JWT Token?

JWT (JSON Web Token) is a compact, URL-safe format for transmitting claims between parties. It is the most widely used standard for API authentication and single sign-on (SSO) systems.

A JWT has three parts separated by dots: the Header (algorithm used), the Payload (the actual data/claims), and the Signature (cryptographic proof of integrity). The header and payload are simply Base64URL-encoded — not encrypted — which means anyone who has the token can read its contents.

  • Header: Contains the token type ('JWT') and signing algorithm ('HS256', 'RS256', etc.)
  • Payload: Contains claims — sub (user ID), exp (expiry), iat (issued at), roles, email, etc.
  • Signature: Proves the token was not tampered with — requires the server's secret key to verify

JWT Security: What You Should Know

A critical misconception is that JWTs are 'encrypted' — they are not. The payload is only Base64-encoded, not encrypted. Do not put sensitive information (passwords, SSNs, credit card numbers) in JWT payloads unless you use JWE (JSON Web Encryption).

Always verify the signature on the server side before trusting any claim in the payload. The signature uses the server's secret key (HMAC) or private key (RSA) — without this verification, anyone could forge a JWT.

Never store JWT tokens in localStorage on sites that run third-party JavaScript. Use httpOnly cookies instead to prevent XSS token theft.

Ready to Get Started?

Try our tool right in your browser. Fast, secure, and 100% free.

Open JWT Decoder

Frequently Asked Questions

Related Guides & Tutorials

Related Tools

Explore other popular free tools in this category.

View all

Case Converter

Convert text between UPPERCASE, lowercase, camelCase, snake_case

Word Counter

Count words, characters, sentences, paragraphs and reading time

Lorem Ipsum Generator

Generate placeholder text and paragraphs

Regex Tester

Test and debug regular expressions with live highlights