JWT Decoder
Decode JWT tokens locally and safely in your browser
About the Local Serverless JWT Decoder
This is a free online tool designed for developers to securely decode and analyze the contents of JSON Web Tokens (JWT). Instantly verify the payload data, algorithm header, and easily check token expirations.
Because tokens usually carry sensitive authentication data, this tool runs entirely on "Client-Side Processing". This ensures that the JWTs you paste are parsed purely by your device's browser and absolutely NO information is transmitted to our servers or saved anywhere online.
How to Use
- Paste Token: Take your raw, encoded JWT string (which usually starts with `ey...`) and paste it into the "Encoded JWT" textbox on the left.
- Instant Parse: The tool will instantly split and decode the token into pretty-printed, syntax-highlighted JSON formats on the right side.
- Verify Header & Payload: The red "Header" box shows metadata like the algorithm. The purple "Payload" box reveals the actual claims (e.g. user IDs, roles).
- Expiration Check: If the payload contains standard `exp` or `iat` timestamps, the tool will automatically convert them to your local time. A badge will alert you whether the token is currently "Valid" or "Expired".
Glossary
- JWT (JSON Web Token)
- A signed token containing a JSON-formatted payload. Widely used in web applications as a mechanism for authentication and authorization.
- Header
- The first part of a JWT. Stores the token type (typ) and signing algorithm (alg) information, Base64Url encoded.
- Payload
- The main data portion of a JWT. Contains claims such as user ID, permissions, expiration (exp), and issued-at (iat) timestamps.
- Signature
- The tamper-detection portion of a JWT. Created by signing the header and payload with a secret key to guarantee token authenticity.
- Base64Url Encoding
- An encoding scheme that converts binary data into URL-safe strings. Each part of a JWT (Header, Payload, Signature) is encoded using this scheme.
- Claims
- Individual items of information within the JWT payload. Includes reserved claims like iss (issuer), sub (subject), exp (expiration), iat (issued-at), and application-specific custom claims.
- Expiration (exp)
- The UNIX timestamp at which the JWT token becomes invalid. This tool converts this value into a human-readable datetime format for easy verification.
Cas d'utilisation
- API Debugging: Verify if your backend authentication server is correctly packing user ID and Roles into the token payload without writing custom decoding scripts.
- Checking 401 Unauthorized Errors: Grab the token from your browser's local storage or developer network tab to instantly check if an expiration timestamp (`exp`) has lapsed.
- Frontend Implementation: Visually confirm the exact JSON structure of the decoded JWT payload to properly map user properties in your frontend React/Vue application.
FAQ
- Q.Le jeton JWT que je saisis est-il envoyé à un navigateur ?
- Non. Le décodage JWT est entièrement effectué par JavaScript dans le navigateur. Le jeton n'est jamais envoyé à l'extérieur, de sorte que même les jetons sensibles peuvent être analysés en toute sécurité.
- Q.Cet outil peut-il vérifier la signature JWT ?
- Cet outil est spécialisé dans le décodage (analyse) de la structure d'un JWT. La vérification de la signature nécessite une clé secrète ; en production, veuillez effectuer une vérification côté navigateur.
- Q.Puis-je décoder un JWT déjà expiré ?
- Oui. Cet outil décode et affiche simplement le contenu du jeton, afin de pouvoir analyser les jetons quel que soit leur statut d'expiration. Vous pouvez également voir en un coup d’œil si le token est expiré.
- Q.Les trois parties JWT (en-tête, charge utile, signature) sont-elles codées par couleur ?
- Oui. L'en-tête (rouge), la charge utile (violet) et la signature (bleu) sont visuellement distingués, le contenu de chaque partie étant affiché au format JSON.
- Q.Que se passe-t-il si je saisis un format JWT non valide ?
- Un message d'erreur s'affiche et vous êtes guidé sur la partie du formatage qui pose problème. Veuillez saisir un JWT valide au format "xxx.yyy.zzz".
- Q.Les horodatages UNIX sont-ils automatiquement convertis ?
- Oui. Les valeurs d'horodatage UNIX telles que exp (expiration) et iat (émis à) sont automatiquement converties au format datetime lisible par l'homme.
- Q.Puis-je l'utiliser sur un smartphone ?
- Oui. L'outil est réactif, vous pouvez donc également coller, décoder et consulter des JWT à partir d'un navigateur de smartphone.