stakritools
Developer
  • Base64 Encoder/Decoder
  • Color Picker & Converter
  • CSS Minifier
  • CSV to JSON Converter
  • Hash Generator
  • HTML Minifier
  • JS Minifier
  • JSON Formatter & Validator
  • JSON to CSV Converter
  • JWT Decoder
  • Markdown Editor
  • Password Generator
  • Regex Tester
  • SQL Formatter
  • Unix Timestamp Converter
  • URL Encoder/Decoder
  • UUID Generator
  • XML Formatter
  • YAML Formatter
View all
Image
  • Favicon Generator
  • Image Compressor
  • Image Cropper
  • Image Flipper
  • Image Resizer
  • Image Rotator
  • Image to Base64
  • JPG to PNG Converter
  • PNG to JPG Converter
  • QR Code Generator
  • SVG to PNG Converter
  • Watermark Image
  • WebP Converter
View all
SEO
  • FAQ Schema Generator
  • Meta Description Generator
  • Open Graph Generator
  • Robots.txt Generator
  • SEO Site Auditor
  • SERP Preview
  • Slug Generator
  • Twitter Card Generator
View all
Text
  • Case Converter
  • Find and Replace
  • Lorem Ipsum Generator
  • Random Text Generator
  • Remove Duplicate Lines
  • Remove Extra Spaces
  • Text Diff Checker
  • Word Counter
View all
Calculator
  • Age Calculator
  • BMI Calculator
  • Compound Interest Calculator
  • Date Difference Calculator
  • Discount Calculator
  • EMI Calculator
  • GST Calculator
  • Income Tax Calculator
  • Loan Calculator
  • Percentage Calculator
  • SIP Calculator
  • Tip Calculator
  • Unit Converter
View all
Blog
stakritools

205+ free, browser-based tools for developers, marketers, and creators — no sign-up, no clutter.

Developer Tools

  • Base64 Encoder/Decoder
  • Color Picker & Converter
  • CSS Minifier
  • CSV to JSON Converter
  • Hash Generator
  • HTML Minifier
  • JS Minifier
  • JSON Formatter & Validator
  • JSON to CSV Converter
  • JWT Decoder
  • Markdown Editor
  • Password Generator
  • Regex Tester
  • SQL Formatter
  • Unix Timestamp Converter
  • URL Encoder/Decoder
  • UUID Generator
  • XML Formatter
  • YAML Formatter

Image Tools

  • Favicon Generator
  • Image Compressor
  • Image Cropper
  • Image Flipper
  • Image Resizer
  • Image Rotator
  • Image to Base64
  • JPG to PNG Converter
  • PNG to JPG Converter
  • QR Code Generator
  • SVG to PNG Converter
  • Watermark Image
  • WebP Converter

SEO Tools

  • FAQ Schema Generator
  • Meta Description Generator
  • Open Graph Generator
  • Robots.txt Generator
  • SEO Site Auditor
  • SERP Preview
  • Slug Generator
  • Twitter Card Generator

Text Tools

  • Case Converter
  • Find and Replace
  • Lorem Ipsum Generator
  • Random Text Generator
  • Remove Duplicate Lines
  • Remove Extra Spaces
  • Text Diff Checker
  • Word Counter

Calculator Tools

  • Age Calculator
  • BMI Calculator
  • Compound Interest Calculator
  • Date Difference Calculator
  • Discount Calculator
  • EMI Calculator
  • GST Calculator
  • Income Tax Calculator
  • Loan Calculator
  • Percentage Calculator
  • SIP Calculator
  • Tip Calculator
  • Unit Converter

Company

  • Blog
  • About
  • Privacy Policy
  • Contact
© 2026 stakritools. All rights reserved.
  1. Home
  2. Developer
  3. JWT Decoder
Developer

JWT Decoder

Paste a JSON Web Token to instantly decode its header and payload, check expiry status, and verify HS256/384/512 signatures — entirely in your browser.

Try:

How To Use

  1. 1.Paste a JWT (a string with three dot-separated parts) into the input box — the header and payload decode automatically as you type.
  2. 2.Review the pretty-printed header and payload, and check the color-coded claims list below for a friendly breakdown of standard fields like sub, iss, and exp.
  3. 3.Check the expiry badge to see at a glance whether the token is Valid, Expiring Soon, Expired, or has No Expiry set.
  4. 4.For HS256, HS384, or HS512 tokens, enter the shared secret to verify the signature — the tool recomputes the signature locally and compares it to the token's own.
  5. 5.For RS256, ES256, and other asymmetric algorithms, verification isn't available here, since checking those requires the issuer's public key rather than a shared secret.
  6. 6.Copy the decoded header or payload individually, or copy/download the full decoded JSON, using the buttons provided.

Examples

Valid token
An HS256 token with a far-future exp claim. Try verifying it with the secret 'your-256-bit-secret' to see a successful signature match.
Expired token
An HS256 token whose exp claim is in the past — see the Expired status badge in action.
Custom claims
A token mixing standard claims (sub, iat, exp) with application-specific ones (roles, tier, credits).
No expiry set
The classic jwt.io example token — it has no exp claim at all, so it shows a No Expiry status.
Malformed token
Only two segments instead of three — see the tool's error handling for a broken token.

About JWT Decoder

What Is a JWT?

A JSON Web Token (JWT, standardized in RFC 7519) is a compact, URL-safe way to represent a set of claims — statements about a user or entity — that can be verified and trusted because it's digitally signed. A JWT consists of three Base64URL-encoded segments separated by dots: a header describing the token's type and signing algorithm, a payload containing the actual claims, and a signature that lets a receiving system verify the header and payload haven't been altered since signing.

JWTs are the backbone of modern stateless authentication: instead of a server keeping a session record for every logged-in user, it issues a signed token containing the user's identity and permissions, and any service that trusts the signing key can verify the token independently without querying a shared session store. This makes JWTs especially popular in distributed systems and microservice architectures, where checking a token's signature locally is far cheaper than making a network call to a central session service on every single request.

JWT Structure: Header, Payload, and Signature

The header is a small JSON object, almost always containing just two fields: alg (the signing algorithm, like HS256 or RS256) and typ (always 'JWT'). It's Base64URL-encoded to form the first segment of the token. The payload is where the actual claims live — it can contain any of the seven standard registered claims (iss, sub, aud, exp, nbf, iat, jti) alongside any number of custom, application-defined claims, and forms the second segment once encoded.

The signature is computed by taking the encoded header and payload, joining them with a dot, and running that string through the algorithm specified in the header — either an HMAC (for HS256/384/512, using a shared secret) or a digital signature (for RS256/ES256/PS256, using a private key). The resulting signature becomes the third segment. Critically, changing even a single character of the header or payload after signing produces a completely different signature, which is exactly the property that lets a verifier detect tampering.

Symmetric vs Asymmetric JWT Signing

HMAC-based algorithms (HS256, HS384, HS512) use a single shared secret for both signing and verifying — simple to set up, but every party that needs to verify tokens must also hold the same secret that can sign new ones, which means any service capable of verification is also capable of forging valid tokens. This makes HMAC signing best suited for systems where the same trusted party both issues and verifies tokens, like a single backend service.

Asymmetric algorithms (RS256, ES256, PS256, and others) use a private/public key pair: the issuer signs with a private key it keeps secret, and distributes the corresponding public key freely to any service that needs to verify tokens. A service holding only the public key can confirm a token is authentic but cannot forge new valid tokens itself, which is exactly the separation of powers needed in larger systems with many independent services — an auth provider issues tokens, and dozens of downstream microservices can each verify them locally using a publicly published key, without any of them being able to mint fraudulent tokens.

Common JWT Security Pitfalls

The most well-known JWT vulnerability is the 'alg: none' attack, where an attacker sets the header's algorithm to 'none' and strips the signature entirely — a poorly implemented verifier that trusts whatever algorithm the token claims to use, rather than enforcing an expected algorithm server-side, can be tricked into accepting a completely unsigned, freely editable token as valid. A related attack targets systems that support both symmetric and asymmetric algorithms: if a verifier is misconfigured to accept HS256 while its actual key is an RSA public key (which is often a publicly known, non-secret value), an attacker can sign a forged token using that public key as an HMAC secret, since the verifier can't tell an HMAC signature from an RSA one just by looking at the bytes.

Other frequent mistakes include never checking exp at all (accepting tokens forever), storing sensitive data in the payload under the mistaken assumption that signing implies encryption, and using an overly simple, guessable HMAC secret that's vulnerable to brute-force. The defensive pattern that avoids all of these: always explicitly specify and enforce the expected algorithm when verifying (never trust the token's own alg claim to decide how to verify it), always check exp and nbf server-side even though this tool shows them for convenience, and never put anything in a JWT payload you wouldn't be comfortable displaying in plain text.

FAQs

No. Decoding happens entirely in your browser using JavaScript's built-in Base64URL decoding and JSON parsing — the token you paste, and the secret you optionally enter for signature verification, are never transmitted anywhere. This matters a lot for JWTs specifically, since a JWT's payload is only Base64URL-encoded, not encrypted, meaning anyone who has the token can already read its contents — but that doesn't mean it should be pasted into an untrusted tool that logs or transmits it. You can verify this yourself by watching your browser's network tab while using the tool: there are no outgoing requests carrying your token or secret. Signature verification also runs locally, using your browser's native Web Crypto API to compute an HMAC and compare it — your secret key never leaves your device either.

Decoding just reverses the Base64URL encoding on the header and payload segments to reveal their JSON content — it requires no secret or key at all, and anyone can do it, which is exactly why a JWT should never contain sensitive data you don't want the token holder to read. Verification is a completely different operation: it checks that the token's signature (the third segment) was actually produced by someone who holds the correct signing key, proving the header and payload haven't been tampered with since the token was issued. A token can decode perfectly and still fail verification — that's the whole point of a signature: it catches exactly that scenario, where someone has modified the payload (say, changing a role from 'user' to 'admin') without holding the secret needed to produce a matching signature for the modified content.

RS256, ES256, PS256, and similar algorithms are asymmetric: the token is signed with a private key that only the issuer holds, and verified with a mathematically related but different public key that can be shared freely without compromising security. This tool only supports verifying HS256, HS384, and HS512 tokens, which are symmetric — the exact same secret string is used both to sign and to verify, so a single 'secret' field is all that's needed. Supporting RS256/ES256 verification would require you to supply the issuer's public key (often published at a JWKS endpoint), which is a meaningfully different workflow from typing in a shared secret, and is out of scope for a quick client-side decoder focused on the most common self-signed and internal-service JWT use cases.

A failed verification means the signature recomputed from the token's header and payload, using the secret you provided, doesn't match the signature embedded in the token itself. This has a few common causes: you entered the wrong secret (the most frequent reason), the token was issued with a different algorithm than its header claims (a class of attack the 'alg' field is specifically designed to guard against when servers validate correctly), or — the reason signatures exist in the first place — the header or payload was modified after the token was signed, meaning the token has been tampered with and should not be trusted. If you're confident the secret is correct and verification still fails, treat the token as untrustworthy rather than assuming it's a tool bug.

These are the seven registered claim names defined by RFC 7519, and this tool highlights them specifically because they carry standardized meaning across virtually every JWT implementation. exp (expiration time) and nbf (not before) are Unix timestamps marking when the token stops and starts being valid, respectively; iat (issued at) records when the token was created. sub (subject) identifies who or what the token is about — typically a user ID. iss (issuer) identifies who created and signed the token, and aud (audience) identifies who the token is intended for, letting a service reject tokens meant for a different service. jti (JWT ID) is a unique identifier for the token itself, often used to detect replay or to support token revocation lists. Any other claim in the payload is an application-specific 'private' claim, defined by whoever issued the token rather than by the JWT spec.

A token within one hour of its exp timestamp is flagged as Expiring Soon rather than simply Valid, because that distinction is often operationally useful: it's the difference between a token you can safely rely on for a long-running operation versus one you should refresh imminently to avoid a request failing mid-flight due to expiry. Many client applications use exactly this kind of early-warning window to proactively refresh an access token before it actually expires, rather than waiting for a request to fail with a 401 and only then reacting. If a token has no exp claim at all, it's marked No Expiry — which technically means it never expires by the JWT spec's own rules, though most production systems still enforce some form of external expiry or revocation for tokens like that.

Not fully — you can trust that the decoded header and payload are an accurate representation of what's inside the token (decoding is purely mechanical and can't lie about the content), but you can't trust that the content is authentic or unmodified unless the signature has been successfully verified against the correct key. Anyone with a text editor can construct a JWT-shaped string with any header and payload they like; what makes a JWT trustworthy in a real system is a valid signature from a key the receiving service actually recognizes as legitimate. This is exactly why production backends must always verify a JWT's signature before trusting any of its claims — decoding alone, which is all a browser extension or a curious developer typically does, should never be treated as proof of authenticity.

Because a standard JWT is signed, not encrypted — Base64URL encoding is not a security mechanism, it's just a way to safely represent binary-adjacent data as URL-safe text, and it's trivially reversible by design (this tool does it instantly, with no key required). The signature protects integrity — proving the content hasn't been altered — not confidentiality. If you need a token whose payload is actually hidden from anyone who intercepts it, you need JWE (JSON Web Encryption), a related but distinct standard, or you need to avoid putting sensitive data in the token payload at all and instead store it server-side, referencing it by an opaque token or session ID. This is a common and consequential mistake: teams sometimes put sensitive data like full names, emails, or internal permissions directly into a JWT payload, not realizing that data is fully readable by the browser, by any proxy or logging system the token passes through, and by anyone who intercepts it in transit.

The tool shows a clear, specific error message rather than crashing or silently producing garbage output — it checks first that the token has exactly three dot-separated segments, then that each segment is valid Base64URL, then that the header and payload segments each decode to valid JSON objects. Common malformed-token issues include missing a segment (only header.payload with no signature), extra whitespace or line breaks copied in accidentally, or a segment that's been truncated when copying from a terminal or log file. If you hit an error, the most common fix is simply re-copying the token carefully, making sure you've captured the entire string including both dots and haven't accidentally included surrounding quotes or a trailing space.

For quick debugging — checking why a request is being rejected, confirming a token's claims or expiry, or verifying a signature during local development — yes, this is exactly the kind of task a client-side decoder is well suited for, since nothing you paste ever leaves your browser. That said, treat production tokens (and especially the secrets used to sign them) with the same care you would treat a password: avoid pasting a live production secret into any tool, including this one, if your organization's security policy restricts where signing secrets may be typed, and prefer testing with a non-production or rotated secret whenever that's a realistic option.

Related Tools

JWT Decoder inspects one specific kind of signed token. These related developer tools cover the encodings and identifiers you'll often encounter working with JWTs and authentication.

Base64 Encoder/Decoder
DeveloperEncode or decode standard Base64 — JWTs use a closely related URL-safe variant for each of their three segments.
Hash Generator
DeveloperGenerate SHA-256 and other hashes — the same hash families used inside HS256/384/512 JWT signatures via HMAC.
UUID Generator
DeveloperGenerate unique identifiers, often used as a token's jti (JWT ID) claim to support revocation.
JSON Formatter & Validator
DeveloperFormat and validate JSON — useful for inspecting a decoded JWT payload with deeply nested custom claims.