Inspect JWT claims while debugging a fictional API session

Decode a sample token to read header, payload, claims, and timestamps while keeping the distinction between inspection and verification clear.

By DevSphere Editorial · · 5 min read

Open JWT Decoder

Use a token that is safe to inspect

A JSON Web Token commonly has three dot-separated segments: an encoded header, an encoded payload, and a signature segment. A decoder makes the first two segments readable and displays the third, which is useful when checking a test fixture or diagnosing a non-sensitive local integration. The payload is often readable by anyone who receives the token; ordinary signed JWTs are not encrypted. Use a fabricated example with fictional claims. Never paste an active bearer token, session credential, or real personal data into a shared environment.

Open JWT Decoder and use the JWT Token textarea. It starts with a sample token and also offers sample buttons such as Basic User and With Roles. Replace the current value only with a dummy token you are authorized to inspect. The page updates the decoded view as you type. The visual token parts label HEADER, PAYLOAD, and SIGNATURE; the following panels show structured header and payload JSON, claim information, expiration status, and a signature string.

Input JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkZW1vLXVzZXItMTciLCJuYW1lIjoiQ2FzZXkgRXhhbXBsZSIsInJvbGVzIjpbInJlYWRlciJdLCJpYXQiOjE4OTM0NTYwMDB9.demo-signature
Expected decoded payload: {"sub":"demo-user-17","name":"Casey Example","roles":["reader"],"iat":1893456000}

Read the header and payload separately

Start with the Header panel and note fields such as `alg` and `typ`. The algorithm label describes what the issuer claims was used; reading it does not prove that the claimed algorithm was actually used or that the signature is valid. Next inspect the Payload JSON. Registered claims such as `iss`, `sub`, `aud`, `exp`, `nbf`, `iat`, and `jti` have familiar meanings, while application-specific keys may represent scopes, roles, or profile data. Check whether each field matches the test's expectations without assuming the tool knows your API's authorization rules.

The Claims area presents payload values, descriptions for recognized keys, and formatted dates for numeric time claims such as `exp`, `nbf`, `iat`, `auth_time`, and `updated_at`. Compare raw seconds and the displayed date; JWT time claims are numeric epoch seconds, whereas many application logs display milliseconds or local time. If the values appear surprising, check units, the system clock, and time zone before concluding that the issuer created an incorrect token.

Trace a claim through a test scenario

For a fictional API test, record the expected audience, issuer, subject, and role in the test description, then compare those fields with the decoded payload. A token may decode correctly and still contain a wrong `aud` or role for the endpoint being tested. The decoder helps you see those values; it does not infer what the server is supposed to accept. Do not use a displayed `roles` entry as evidence that a real user is entitled to that role. Authorization decisions must be made by the trusted service after validating the token.

When a claim is missing, use the Copy button in the Payload section to retain the parsed JSON for a local test note, or inspect the raw token when diagnosing the producer. Keep copies limited to fabricated content. The UI also gives a token-size breakdown by segment, which can help identify an unexpectedly large payload. Size does not demonstrate validity, and the payload may reveal information to anyone who can read the token.

Interpret expiration status narrowly

The page checks an `exp` claim against the browser's current time and reports expired or remaining time. It can also show `nbf` as active or not yet valid, and `iat` with an age. These are useful display calculations for debugging a known test token. They do not prove that a token is valid according to a server: a verifier may enforce issuer, audience, allowed algorithms, key rotation, clock skew, revocation, and other rules that this interface does not evaluate.

A status banner that looks positive is a decoding and date observation, not an authentication decision. In particular, successful Base64URL decoding says nothing about whether a signature matches a trusted key. Treat expiration display as a prompt to inspect a claim, not as permission to use a token. Test acceptance by calling a controlled service that performs cryptographic verification and policy checks, then record its actual result.

Troubleshoot malformed input safely

The decoder expects three dot-separated parts and JSON-formatted header and payload after Base64URL decoding. If it reports an invalid JWT format, verify that the copied string is complete and has exactly two separators. If JSON decoding fails, remove surrounding quotation marks or whitespace added by a log viewer and copy from the original test fixture. Avoid pasting a partial signature or editing a token segment by hand. A successful decode of the first segments still does not validate the token.

JWTs may contain claim values that are arrays, objects, booleans, or strings, not just text. Read the value type before comparing it with a test expectation. A numeric timestamp may be rendered in local time, so use the raw number and UTC or ISO value when comparing machines. Do not publish decoded content from a real credential in a screenshot or issue report; redact or replace it with a wholly fabricated token.

Verify the debugging conclusion

To finish a safe diagnostic, compare the fictional claim values to your expected fixture, confirm the header algorithm label, and note the displayed expiration interpretation with the browser's approximate clock context. Then test the same case through the authorized verifier or service. If the service rejects the token, investigate its cryptographic result and configured policy rather than trusting this display. If the service accepts it, that acceptance is evidence from the verifier, not from decoding alone.

JWT Decoder is a read-only inspector. It does not sign tokens, change claims, validate signatures, authenticate users, or determine authorization. Signature verification requires a trusted library and the correct secret or public key in a controlled environment. Keep real tokens out of general-purpose tools, and remember that a signed token's contents are usually visible. Those boundaries let the decoder be useful for troubleshooting without confusing readable claims with trusted identity.

Browse all tutorials