SupperTools

Useful Online Tools & Utilities to Make Everyday Tasks Easier.

JWT Encoder and Decoder to Inspect and Build Tokens

Inspect what a JSON Web Token really contains, verify its signature, and encode new tokens for development and testing, all without leaving your browser.

Encoded Token
Verify Signature
Used to recalculate and verify the hash.
Decoded Data Status

HEADER: ALGORITHM & TOKEN TYPE

PAYLOAD: DATA

JSON Web Tokens appear everywhere in modern sign-in and API work, yet a token itself looks like an unreadable string of random characters. This JWT Encoder and Decoder lets you decode, verify, and encode JSON Web Tokens directly in your browser, so you can see what a token actually contains and build tokens for testing without guessing at their structure.

The Three Parts of a Token

A JWT is made of three sections separated by dots. The first is the header, which typically states the token type and the signing algorithm used. The second is the payload, which holds claims: statements such as who the token was issued to, when it expires, and who issued it. The third is the signature, produced by applying the stated algorithm with a secret or key pair to the first two parts.

The header and payload are not encrypted. They are encoded in Base64URL, which anyone can decode, so a token's contents should never be treated as secret. The signature is what provides trust: if the payload is altered, the signature no longer matches, and a verifier that checks it will reject the token. Decoding shows you the claims; verification tests whether the signature is genuine.

Features of the JWT Encoder and Decoder

  • Instant decoding: paste a token and read its header and payload as ordinary JSON, with the claims laid out instead of buried in an encoded string.
  • Signature verification: supply the secret or key a token was signed with and check whether its signature is genuinely valid for its contents.
  • Token generation: build a token from your own header and payload and produce it with the Generate Token button, ready for development and testing.
  • Works in your browser: decoding, verifying, and encoding all happen on the page in front of you, which suits the quick, repeated checks that debugging involves.

How to Decode, Verify and Encode a Token

  1. To inspect a token, paste the full JWT, including both dots, into the decoder.
  2. Read the header and payload that are shown, checking claims such as expiry and subject.
  3. To verify, provide the secret or key the token was signed with, where verification is required, and check the result.
  4. To encode, enter a header and payload as JSON and supply the signing material.
  5. Click Generate Token to produce the finished token.
  6. Copy the resulting token for use in your test or request.

Everyday Reasons to Decode a Token

The most common job is debugging authentication. When a request is rejected, decoding the token reveals whether it has expired, was issued for a different audience, or is missing a claim your API expects. Developers also decode tokens to confirm that a login flow is putting the right user identifier and roles into the payload before those claims are relied on.

Encoding has its place in development and testing. You can create tokens with specific claims to test how an application responds to an expired token, an admin role, or a missing field, without going through a full sign-in each time. If you work with the building blocks underneath, our text to Base64 converter shows the encoding used on token segments, and our hash generator covers related hashing tasks.

Handling Tokens Safely

Treat a live token like a password while it is valid, because anyone holding it can usually present it as you. Avoid pasting production tokens into random places, avoid sharing them in screenshots or messages, and never put sensitive personal information in a payload, since anyone can decode it. Decoding a token you have been given for debugging is normal practice; publishing it is not.

Also note what decoding does not prove. Seeing plausible claims in a payload says nothing about authenticity until the signature is verified with the correct key. Keep the algorithm in mind while you work: the header declares which algorithm the signature uses, and a verifier should insist on the algorithm it expects rather than accepting whatever a token declares. When you encode test tokens, matching the algorithm and key type your application actually uses makes your tests meaningful. For generating signing secrets in test setups, our random secret key generator can provide material to work with.

Tips, Limitations and Common Mistakes

The most common mistake is treating a decoded payload as proof of identity; only a verified signature earns that trust. A second is trusting the expiry claim without checking it, when a quick look at the expiration timestamp settles most rejected-request mysteries. Remember the tool's boundary, too: it works with standard JSON Web Tokens, and a malformed string missing a section, or a token type your application does not use, will not decode or verify in a meaningful way. Finally, check the clock when a fresh token seems expired, because a wrong system time can make valid tokens look out of date.

Frequently Asked Questions

Is a JWT encrypted?

A standard JWT is signed, not encrypted. Its header and payload are Base64URL encoded and readable by anyone who has the token. The signature protects against tampering; it does not hide the contents.

What does it mean when verification fails?

Verification fails when the signature does not match the header and payload under the expected key. That can mean the token was altered, the wrong secret was used, or the token was signed with a different algorithm or key than expected.

Which claims should I check first when debugging?

Start with the expiry time, then the issuer and audience, and then the subject or user identifier. A token that is expired or intended for a different service explains most routine authentication rejections.

What is the difference between decoding and verifying?

Decoding simply reads the header and payload aloud, which anyone can do with any token. Verifying additionally checks the signature against the correct key, which is the step that establishes the token is genuine and untouched.

Can I create tokens for testing my own application?

Yes. Enter the header and payload claims you want, supply signing material, and generate the token. Test tokens let you rehearse expired, mis-scoped, or role-specific cases without a full sign-in flow.

Making the Most of the JWT Encoder / Decoder

A JWT stops being mysterious the moment you can read it. Decoding reveals the claims your application is actually working with, verification tells you whether to trust them, and encoding lets you manufacture the exact cases your tests need. Keep this tool beside your API work and authentication bugs become questions you can answer in seconds rather than guess at.

Related Tools