Tools

Home
Base64 Encode/DecodeHash GeneratorEncrypt/DecryptJSON ViewerURL Encode/Decode

JWT Token Decoder

Decode and inspect JSON Web Tokens -- view header, payload, signature, and check expiration

Your files never leave your browser
Ready·Paste a JWT to decode

Paste a JWT token above to decode it

Or click "Sample JWT" to try a demo token

Paste a JWT and instantly see the header, payload, and signature split into color-coded cards — with expiration dates converted from Unix timestamps to actual readable dates. Badges flag the algorithm, validity, and whether the token is still active or already dead.

Handy when you're debugging 401 errors, checking scopes on an OAuth token, or just trying to figure out what claims got packed into a login response. And everything runs in your browser. Nothing gets uploaded.

How It Works

Paste JWT Token
➔
Split & Base64 Decode
➔
Display Header, Payload & Signature

A JWT is three base64url-encoded chunks joined by dots. The decoder splits on those dots, runs each piece through base64url decoding, then parses the resulting JSON. The header tells you the signing algorithm. The payload holds your claims — user ID, roles, expiration, whatever the issuer packed in. The third chunk is the raw signature, displayed as-is since verifying it would require the server's secret key.

Examples

Debugging an expired API token

Your API calls keep returning 401. You grab the token from the request headers to check if it's expired.

INPUT
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c2VyXzQ0MjEiLCJyb2xlIjoiYWRtaW4iLCJleHAiOjE3MTE4NDAwMDAsImlhdCI6MTcxMTc1MzYwMH0.abc123sig
OUTPUT
Header: {"alg":"HS256","typ":"JWT"} Payload: {"sub":"user_4421","role":"admin","exp":1711840000,"iat":1711753600} Status: EXPIRED

Checking what scopes an OAuth token carries

A third-party integration is failing on certain actions. You want to see which permissions the token actually includes.

INPUT
eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJhdXRoLmV4YW1wbGUuY29tIiwic3ViIjoic3ZjX2FjY3QiLCJzY29wZSI6InJlYWQ6dXNlcnMgd3JpdGU6cmVwb3J0cyIsImV4cCI6MTczMjA1NjAwMH0.rsasig456
OUTPUT
Header: {"alg":"RS256","typ":"JWT"} Payload: {"iss":"auth.example.com","sub":"svc_acct","scope":"read:users write:reports","exp":1732056000} Scopes: read:users, write:reports

Verifying user identity claims in a support ticket

A user reports they can't access a resource. Support asks them to share their token so you can check the sub and role claims without hitting the database.

INPUT
eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyXzg4MTIiLCJuYW1lIjoiSmFuZSBEb2UiLCJyb2xlIjoiZWRpdG9yIiwidGVhbSI6Im1hcmtldGluZyIsImlhdCI6MTcxMTkwMDAwMH0.xyz789
OUTPUT
Header: {"alg":"HS256"} Payload: {"sub":"user_8812","name":"Jane Doe","role":"editor","team":"marketing","iat":1711900000} Role: editor | Team: marketing

Who Uses This

💻 Backend Developers

Debugging auth flows, checking token claims during API development, and confirming expiration logic works correctly.

🔒 Security Engineers

Inspecting tokens during penetration tests or audits to see what data is exposed in the payload.

🎛 DevOps / SRE

Troubleshooting failed deployments and CI pipelines where service-to-service tokens carry wrong scopes or are already expired.

📚 Students

Learning how JWTs work by pasting sample tokens and seeing the structure broken down visually.

Common Mistakes

Thinking "decoded" means "verified"

Decoding only shows you the contents. It does not prove the token hasn't been tampered with. Signature verification requires the secret key and must happen server-side. Never trust decoded claims without checking the signature on your backend.

Pasting a token with extra whitespace or newlines

Copying from logs or emails sometimes grabs trailing spaces or line breaks. The decoder will fail or show garbage if your token has invisible characters. Trim the string first — or at least make sure it's one continuous line with no spaces.

Confusing the "exp" timestamp format

JWT expiration uses Unix seconds, not milliseconds. If you're comparing exp to Date.now() in JavaScript, you'll be off by a factor of 1000 and think every token is valid for centuries. Divide Date.now() by 1000, or multiply exp by 1000 — pick one and be consistent.

Technical Details

Frequently Asked Questions

What is a JWT token used for?

JWTs are mostly used for authentication. After you log in, the server sends back a signed token containing your user ID and permissions. Your browser stores it and sends it with every request, so the server knows who you are without hitting the database each time. They're also used for API authorization between microservices.

Can you decode a JWT without the secret key?

Yes. The header and payload aren't encrypted — they're just base64-encoded. Anyone with the token can read them. The secret key is only needed for verifying the signature, which proves the token wasn't modified after it was issued. That's a common point of confusion: encoding is not encryption.

How do I check if a JWT is expired?

Look at the "exp" field in the payload. It is a Unix timestamp in seconds. This tool converts it to a readable date and shows an "Expired" or "Valid" badge automatically. If you're checking in code, compare exp against Math.floor(Date.now() / 1000) — remember, Date.now() returns milliseconds, not seconds.

What's the difference between JWS and JWE?

JWS (JSON Web Signature) is what most people mean when they say "JWT" — it's signed but the payload is readable by anyone. JWE (JSON Web Encryption) actually encrypts the payload so only the intended recipient can read it. Most auth systems use JWS because the server only needs to verify who sent the token, not hide its contents from the client.

Is it safe to decode JWTs in the browser?

Perfectly safe — this tool runs JavaScript locally and sends nothing to a server. The real risk isn't in decoding, it is in where you paste the token. Don't drop production tokens into random websites that might log them. This tool specifically avoids any network calls, so your token stays on your device.

Share: