devtools.codes

Is it safe to paste a JWT into an online decoder?

Your tool input is processed locally in your browser and is not intentionally uploaded to our servers. Advertising and analytics providers may still process normal page, device, cookie and network information.

A JSON Web Token is not an identifier. It is a bearer credential, which means whoever holds it can act as the subject it describes until it expires. Pasting one into a web page is therefore closer to pasting a password than to pasting a log line, and the usual reassurance — that the payload is only base64, not encryption — misses the point entirely. The payload being readable is exactly why the token is dangerous to hand over.

The practical question is whether the page sends the token anywhere. A decoder that posts your token to its own backend has, for the lifetime of that token, everything it needs to impersonate you against the issuing API. That lifetime is often longer than people assume: access tokens of an hour are common, refresh tokens can run for weeks, and a token minted for a service account may not expire at all. The window is not theoretical.

You can tell the two apart without trusting anyone's marketing copy. Open your browser's developer tools, switch to the Network tab, clear it, then paste a token and decode. If a request appears carrying the token in its URL, body or headers, the tool is server-side. If the tab stays empty, the decoding happened in the page. This check takes about fifteen seconds and is more reliable than any claim on the page, including ours — run it here if you like.

When a token has already gone somewhere you did not intend, treat it as compromised rather than probably fine. Revoke or rotate it at the issuer, the same way you would a leaked API key, and check the audit log for the period between the paste and the revocation. Reasoning about whether anyone actually looked is not a control; revocation is.

There is a narrow case where pasting is genuinely fine: a token that is already expired, or one you minted yourself for a test with no real subject and no real audience. Expiry is the cleanest signal, and it is the first thing worth reading — a token past its `exp` claim cannot be replayed, so the question stops mattering. Decoding it locally tells you that in one step.

More on JWTs and what a decoder can see

Is a JWT encrypted?

A standard signed JWT is not. The header and payload are base64url-encoded, which is transport encoding, not secrecy — anyone holding the token can read every claim in it without a key. The signature protects against tampering, not disclosure. Encrypted variants exist under JWE, but they are uncommon and are not what most APIs issue.

Can someone use my token if they only decoded it?

Yes, if it has not expired. Decoding and using are not different acts from the token's point of view: a bearer token is accepted by the API because it is presented, not because of who presents it. Reading the claims and replaying the token against the issuing service are the same capability.

How do I check whether a JWT has expired?

Read the `exp` claim, which is a Unix timestamp in seconds rather than milliseconds — a factor of a thousand is the usual mistake. Compare it against the current time. Also check `nbf` if present, which is the earliest time the token is valid; a token can be rejected for being too new as well as too old.

Does this tool verify the signature?

No, deliberately. Verifying a signature requires the signing key, and a tool that asked you for your key would be asking for something considerably more sensitive than the token. This decodes and inspects only. Verification belongs in your application, against a key it already holds.

Related