JWT Decoder
Input JWT Token
Decoded Token
Paste a token to decode
Paste a token to decode
Zero Width Character Encoder/Decoder
Imagine you are logging into a website. Instead of the server having to check your username and password every single time you load a new page, which would be slow and annoying, it hands you a little digital "hall pass" that says "Yep, this person is already logged in, let them through."" That hall pass is basically what a JWT (JSON Web Token) is.
JWT (pronounced "jot") is JSON Web Token mainly used in exchange of information. At its core, it's a compact, URL-safe way to represent claims (pieces of information) between two parties - usually a client (your browser or mobile app) and a server. You can read more about JWT token on wikipedia.
In modern web development, if you have worked with APIs, authentication, or single sign-on systems, you've almost certainly run into JWT. It has widespread use case in modern application ranging from protecting REST APIs to handling login sessions in React, Node.js, Vue, or Angular apps.
A JWT looks like a long random string, something like this:
The above token might look complicated to you, but if you will observe it, you will find it constituted by three parts separated by '.'
There is officially no type in JWT tokens but in practice, developers use the same format for a couple different jobs:
JWT Decoder is simply a tool, might be an online tool, that provided solution to convert long scary looking JWT into JSON format so that you can see what is inside it. There are plenty of times you might need this tool like you you want to see whats inside the token provided by others for security purpose. If you have creating your own JWT, then using this tool, you can check whether it is working or not.
The working of JWT decoder is very simple. It just splists the long string from dot, which connects different parts(header, payload, signature)
Upon splitting, it get converted into three base64url strings. Base64url-decode the first part -> header JSON. Base64url-decode the second part -> payload JSON. (Optional) Take the header + payload, re-create the signature using the secret/key you have, and compare it to the third part. If they match -> token is valid and untampered. Quite simple steps, not for human but for machines.