How-to · 17 Nov
How-to · 2 min read
How to decode a JWT online without sending the token to a server
An API call fails with an authorization error, and you need to look inside the token to see the claims, the expiry time and who issued it. The quickest way is to paste it into an online decoder, but this token might be from production and could still be valid. You have no idea what the site does with what you paste, or whether it ends up in someone's logs. So you either take the risk or start writing a small script just to read three fields.
01
Why it's hard
A JWT is only encoded, not encrypted, so anyone who gets a live token can often use it until it expires. Many tool sites send what you paste to their servers, and they rarely say so clearly. Writing your own decoder each time is slow, and doing it in a hurry during an incident leads to mistakes. Ads and slow, cluttered pages make the simple job of reading a token feel harder than it should be.
This part describes the usual way. It makes no claims about DevTools Hub, so nothing is quoted here.
02
How DevTools Hub does it
DevTools Hub is a set of free developer tools where nearly every tool runs in your browser. When you paste a JWT into the decoder, it is processed locally in JavaScript and never sent to a server, which also makes it fast. The JWT Toolkit has eight tools to decode, understand, verify, build and secure tokens in one place. The site was built out of frustration with cluttered tool pages, so the input box is easy to reach.
When you paste a JWT into the decoder or generate a password, that data is processed locally in JavaScript and never transmitted to a serverQuoted from devstoolshub.com
All eight tools run entirely in your browser; nothing you paste is ever sent anywhere.Quoted from devstoolshub.com
since there's no network round-trip involvedQuoted from devstoolshub.com
03
Step by step
- 1Open the JWT Toolkit on DevTools Hub.
- 2Paste the token into the decoder; it is read in your browser, not on a server.
- 3Check the header and claims, such as the issuer and the expiry time.
- 4Use the verify tool when you need to confirm the token was signed with the key you expect.
- 5Close the tab when you are done, and rotate the token if you think it was exposed elsewhere.
04
Tips
Treat every real token like a password. Even with a local decoder, avoid pasting live production tokens into shared screens or chat, and prefer expired or test tokens when you only need to check the format.
General advice. Not a claim about the product.
Read the expiry and issued-at claims first. Most authorization errors come from a token that expired or was issued for a different audience.
General advice. Not a claim about the product.
Keep related tools close. The same site has hashing, encoding and password tools that also run in the browser, which helps when you are debugging a whole auth flow.
MD5, SHA, checksums, HMAC, and password hashingQuoted from devstoolshub.com
Check the privacy policy of any tool you rely on during incidents. DevTools Hub points to its Privacy Policy for the details of what is processed locally.
see the Privacy Policy for the specificsQuoted from devstoolshub.com
05
Questions
Is DevTools Hub free?
Yes, the tools are free to use.
Free tools for developersQuoted from devstoolshub.com
How many JWT tools are there?
The JWT Toolkit has eight tools.
JWT Toolkit 8 toolsQuoted from devstoolshub.com
Does anything leave my device?
The site says every tool runs in your browser and your data never leaves your device.
Every tool runs locally in your browser; your data never touches a server.Quoted from devstoolshub.com