Skip to content
JWT → JSONDeveloper tools

JWT Decoder & Inspector

Decode a JSON Web Token to see the user, roles, scopes and expiry, check it for security problems, and verify its signature with a secret, PEM key or JWKS.

Did this tool work for you?

Used JWT Decoder & Inspector? Share how it went to help others.

About this tool

About JWT Decoder & Inspector

JWT Decoder & Inspector shows what is inside a JSON Web Token. Paste a token, or a whole "Authorization: Bearer …" header, and it is split into its header and payload and shown as formatted JSON that you can copy. A status bar tells you whether the token has expired, is not valid yet (from its nbf claim) or is still within its lifetime, with the exact time and how long ago or how soon that is. A “Who is this token for?” card picks out the username, name, email, user ID, client app and tenant, with the roles, groups and scopes the token carries, from the claims used by common identity servers such as Keycloak, Auth0, Microsoft Entra ID and Amazon Cognito. A security check points out problems such as no expiry, a very long lifetime, times written in milliseconds, a missing audience or issuer, secrets in the payload, or a short HMAC secret. You also get ready code to read the username claim in JavaScript, Node.js, Python and PHP. The standard claims are listed in plain words: issuer (iss), subject (sub), audience (aud), expiry (exp), not-before (nbf), issued-at (iat) and token ID (jti), with Unix timestamps turned into readable dates in your time zone. Decoding alone does not prove a token is genuine, because anyone can create one, so the inspector can also verify the signature: for HS256, HS384 and HS512 enter the shared secret, as plain text or Base64; for RS256-512, PS256-512 and ES256-512 paste the PEM public key, a JWK, or a whole JWKS, and the key named by the token’s kid is used. The result says "Signature verified" or "Invalid signature" immediately. Tokens with "alg": "none" are flagged as unsigned. Encrypted tokens (JWE, five parts) and opaque access tokens, such as those from Google or GitHub, are recognised and explained. Everything, including your token and key, is processed in your browser with the Web Crypto API and never sent to a server, so it is safe to inspect tokens from your own apps. Still, avoid pasting live production tokens for other people’s accounts anywhere.

JWT Decoder & Inspector tool

When developers decode JWTs

Debug auth without guesswork

401 errors

Find out why an API rejects a request.

ExampleThe status bar shows the token expired 12 minutes ago, so the refresh flow is broken.

Wrong user or role

Check which user and permissions a token carries.

ExampleThe payload shows "role": "viewer" instead of "admin".

Audience mismatch

Confirm the token was issued for the right API.

Exampleaud is "web-app" but the API expects "orders-api".

Testing signatures

Make sure your backend signs tokens with the expected key.

ExampleA token from staging fails verification with the production public key, as it should.

Clock problems

Spot tokens issued in the future because of server clock drift.

Exampleiat is "in 3 minutes", so the auth server’s clock is ahead.

Learning OAuth and OpenID

See what a real ID token or access token contains.

ExampleAn ID token shows iss, sub, aud, email and exp side by side.

JWT tips

Safer tokens, faster debugging

Decoded is not verified

Anyone can create a token with any payload. Servers must always verify the signature; use the key field here to check it yourself.

Payloads are readable

JWT payloads are only Base64URL-encoded, not encrypted. Never put passwords or secrets in them.

Reject alg: none

An unsigned token must never be accepted. Make your server allow only the algorithm you expect.

Keep access tokens short-lived

Short expiry times (minutes, not days) limit damage if a token leaks; use refresh tokens for long sessions.

Need an HMAC for testing?

Create HMAC-SHA signatures for any message to compare with your backend.

Open HMAC Generator

Decode Base64 parts by hand

Each JWT part is Base64URL. Decode any single part to see raw bytes.

Open Base64 Encode/Decode
Built & tested by

HemantInsights

Senior Software Engineer · Developer of Toolyconvert

Hemant developed JWT Decoder & Inspector and tests it on desktop and mobile with real files. He is a senior software engineer from Dehradun, India, building websites since 2014, and designed and developed Toolyconvert end to end.

Last updated 24 November 2026

Answers and guidanceFrequently Asked Questions
What is a JWT?
A JSON Web Token: three Base64URL parts (header, payload, signature) separated by dots, used to prove who a user is to an API.
How do I get the username from a JWT token?
Paste the token and look at “Who is this token for?”. The username is usually in the preferred_username, username, upn or email claim, or in sub. Below it is ready code that reads the same claim in JavaScript, Node.js, Python and PHP.
How do I inspect a bearer token?
Paste the whole Authorization header. The word Bearer is removed, and you see the user, roles, scopes, expiry and a security check. If the token is not a JWT, the tool says what it looks like instead.
Can I convert an access token to a JWT?
No. An access token is either already a JWT, with three parts separated by dots, or it is opaque, a random reference only the issuing server can look up. For an opaque token, use the server’s introspection or userinfo endpoint, or decode the ID token instead.
How do I see the roles or scopes in a token?
They are listed under the user. The tool reads role, roles, groups, scope, scp, permissions and authorities, plus Keycloak realm and client roles and Cognito groups.
Is it safe to paste my token here?
The token is decoded in your browser and never sent to a server. Still, treat live tokens like passwords and do not share them.
Does decoding check if the token is valid?
Decoding shows the contents and expiry. To know the token is genuine, verify the signature with the secret or public key.
Which algorithms can it verify?
HS256, HS384, HS512, RS256, RS384, RS512, PS256, PS384, PS512, ES256, ES384 and ES512.
What key format does it need?
For HS algorithms, the shared secret as plain text or Base64. For RS, PS and ES, a PEM public key, a JWK, or a JWKS. With a JWKS, the key whose kid matches the token is used.
What do exp, iat and nbf mean?
Expiry time, issued-at time and not-valid-before time, as Unix timestamps. The inspector shows them as readable dates.
Why does it say "not yet valid"?
The nbf claim is in the future, or the server that issued the token has a clock that runs ahead.
Can it decode an encrypted token (JWE)?
No. A JWE has five parts and needs the private key to decrypt; the inspector tells you when it sees one.
Can I paste the whole Authorization header?
Yes. "Bearer" and "Authorization:" prefixes are removed automatically.
Can I edit and re-sign a token?
No. This tool reads and verifies tokens; it does not create them.
More tools for your workflowRelated Tools

Featured on

Toolyconvert is listed on these product directories and launch platforms.