Decode a JWT without verifying its signature
Returns the header, the payload and readable exp/iat/nbf claims with an expiry flag. The signature is never verified, so never trust the claims.
Parameters 1
| Name | Type | Description |
|---|---|---|
token | query · string | The JWT. If omitted, the Bearer token from the Authorization header is used. |
Responses
- 200
- Success.
- 400
- No token, wrong number of parts, or a part is not base64url-encoded JSON.
Example
Request
curl -X GET "https://api.testingapis.com/api/utils/jwt/decode?token={{userJwt}}" \
-H "X-TestingApis-Key: YOUR_API_KEY"Response200 OK
{
"header": {"alg": "HS256", "typ": "JWT"},
"payload": {
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier": "user",
"http://schemas.microsoft.com/ws/2008/06/identity/claims/role": "user",
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress": "user@example.com",
"jti": "483a95f9-27f2-4fac-8cad-5fbfb00d0864",
"nbf": 1790792795,
"exp": 1790793695,
"iss": "https://api.testingapis.com",
"aud": "https://api.testingapis.com"
},
"signature": "eproOvW-6EYJzoQ8Z6TYiCu90Id1yK-n_tJlKeYKpLY",
"verified": false,
… (8 more lines)Sign in to see the details
The parameters, request and response examples and the live Try it panel for this endpoint are for signed-in members. Accounts are free and take a few seconds to create.