JWT Decoder

Decode JSON Web Tokens to reveal their header and payload for debugging. No signup. Decoding is not verifying, and never paste real production tokens into any tool.

Remove Ads
Remove Ads

Result

Header
Payload

Note: this decodes the token only. It does not verify the signature, which requires the secret key.

Remove Ads

Share on Social Media:

A JWT decoder decodes a JSON Web Token to reveal its header and payload, so you can see what a token actually contains while debugging — free, with no account. Paste a test token and the header and payload appear as readable JSON. It runs entirely in your browser, so nothing is uploaded. Decoding is not verifying: it never checks the signature, and you should never paste real production tokens into any online tool.

On this page

  1. How to Decode a JWT Step by Step
  2. What a JWT Is and How It Is Structured
  3. Decoding Versus Verifying a Token
  4. Who Uses a JWT Decoder
  5. Pro Tips for Working With JWTs Safely
  6. Common JWT Mistakes to Avoid
  7. Related Tools You May Need Next
  8. Frequently Asked Questions

How to Decode a JWT Step by Step

  1. Paste the JSON Web Token into the input box. Use a test or example token — never a real production or sensitive token.
  2. Click Decode. The tool splits the token on its dots and decodes the first two parts.
  3. Read the decoded Header. It shows the token type and the algorithm the token says was used for its signature, e.g. {"alg": "HS256", "typ": "JWT"}
  4. Read the decoded Payload. It shows the claims — the data the token carries, such as user identifiers and timestamps.
  5. Copy either section with its Copy button, if you need the JSON elsewhere. There is no download button.
  6. Use it for debugging. Inspect the decoded contents to understand or troubleshoot your authentication — while remembering that decoding does not verify the token.

Illustration of a JWT token being inspected, showing its header, payload and signature parts

What a JWT Is and How It Is Structured

A JSON Web Token, or JWT, is a compact, self-contained way of representing information to be transferred between parties, widely used in web authentication and authorisation. A JWT carries a set of claims — pieces of data — in a structured form, and is commonly used to represent that a user is authenticated, passing this securely between a server and a client. Understanding what a token contains is often necessary when developing and debugging such systems.

A JWT has three parts, separated by dots within the token: the header, the payload and the signature. The header describes the token, including the algorithm used for its signature. The payload contains the claims, the actual data the token carries, such as user identifiers and other information. The signature is used to verify that the token has not been tampered with and comes from a trusted source. These three parts together make up the token. This tool decodes and shows the first two parts only — the signature is never displayed.

Worked example — the standard example token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c decodes to:

PartDecoded JSON
Header{ "alg": "HS256", "typ": "JWT" }
Payload{ "sub": "1234567890", "name": "John Doe", "iat": 1516239022 }
SignatureNever shown — decoding only, no verification

The iat value 1516239022 is 2018-01-18 01:30:22 UTC. The tool shows it only as the raw number — to read any exp or iat claim as a date, paste the number into the Unix Timestamp Converter.

Never paste real production or sensitive tokens. Because a JWT's payload is encoded, not encrypted, anyone with the token can read its contents. Never paste real production or sensitive tokens into any online tool, as this could expose the data they carry. Use only test or example tokens for decoding and learning. A crucial point is that the header and payload of a JWT are encoded, not encrypted. This means anyone can decode and read them, since the encoding is a reversible, standard format, not a secret one. A JWT decoder simply reverses this encoding to show the header and payload contents. This is why a JWT should never carry secret information in its payload, and why decoding a token reveals its data to anyone who has it.

Decoding Versus Verifying a Token

AspectDecodingVerifying
RevealsHeader and payload contentsWhether the token is genuine
NeedsJust the tokenThe secret or key
Anyone canYes, contents are encoded not encryptedNo, needs the key
This tool doesDecoding onlyNot verification

The most important distinction is between decoding and verifying a token. Decoding reveals the header and payload contents, which anyone can do, but it says nothing about whether the token is genuine and untampered. Verifying involves checking the signature, which requires the secret or key and confirms the token's authenticity and integrity. A decoder only decodes; it does not and cannot verify. So decoded contents show what a token claims, not that those claims are trustworthy. A token with only two parts (header.payload, no signature) still decodes fine here — and that is itself a sign it cannot be verified.

Who Uses a JWT Decoder

Developers debugging authentication. A developer working on authentication decodes a test token to see its claims, understanding what data it carries while debugging the system.

People learning about JWTs. Someone learning how JSON Web Tokens work decodes example tokens to see their structure, the header, payload and claims, building understanding.

People inspecting token contents. A developer wanting to see the data inside a JWT, using test tokens, decodes it to reveal the header and payload contents for inspection.

People troubleshooting token issues. Someone whose authentication is not behaving as expected decodes a test token to check whether its claims are as intended, aiding diagnosis.

Anyone understanding a token's data. Anyone who receives a token and wants to know what it carries decodes it to read the header and payload before deciding what to do with it.

Laptop showing a JWT split into header, payload and signature parts

Pro Tips for Working With JWTs Safely

Only use test or example tokens. Never paste real production or sensitive tokens into any online tool, since the payload is readable once decoded. Use test or example tokens for decoding and learning, keeping real tokens secure.

Remember decoding is not verifying. Decoding reveals a token's contents but says nothing about whether it is genuine. Verifying requires checking the signature with the secret or key. Never treat decoded contents as proof a token is valid or trustworthy.

Never put secrets in a JWT payload. Because the payload is encoded, not encrypted, anyone with the token can read it. Never place secret or sensitive information in a JWT payload, since it is not hidden, only encoded in a readable, reversible format.

Use decoding to understand token data. Decoding is genuinely useful for seeing what claims a token carries when developing and debugging, letting you inspect the header and payload to understand or troubleshoot your authentication.

Verify signatures in your code properly. Actual verification of a token's authenticity must happen securely in your code with the proper key, not in a decoder. Ensure your system verifies signatures correctly, which is what establishes a token's trustworthiness.

Read exp and iat as dates with the Unix Timestamp Converter. The decoder shows these claims only as raw numbers of seconds since epoch. Paste the number into the converter to see the actual date and time.

Handle real tokens securely. Real JWTs used in authentication should be handled securely, transmitted over secure connections and stored safely, never exposed in tools, logs, or insecure places, since they can grant access if obtained by others.

Common JWT Mistakes to Avoid

Pasting real production tokens into online tools. Because a JWT's payload is encoded, not encrypted, pasting a real token into any online tool exposes its contents and risks the token itself. Never do this with production or sensitive tokens; use only test or example tokens for decoding, keeping real tokens secure.

Thinking decoding verifies a token. Decoding reveals a token's contents but does not verify its authenticity or integrity. Verifying requires checking the signature with the secret or key. Treating a successfully decoded token as verified is a serious mistake, since anyone can decode a token regardless of whether it is genuine. A forged token decodes just as cleanly as a real one.

Putting sensitive data in the payload. The JWT payload is encoded, not encrypted, so anyone who has the token can read it. Placing secret or sensitive information in the payload, assuming it is hidden, exposes that data. Only non-secret claims belong in a payload, since its contents are readable by anyone who has the token.

Treating a decoded exp number as a date. The exp and iat claims are seconds since epoch, shown as plain numbers. Convert them with the Unix Timestamp Converter to see the actual date — the decoder gives no expiry verdict.

Expecting the tool to show the signature. It never does. The third part of the token is ignored entirely; only the header and payload are decoded and displayed.

Handling real tokens carelessly. Real JWTs can grant access, so exposing them in tools, logs, or insecure storage risks their misuse by anyone who obtains them. Handle real tokens securely, transmitting them over secure connections and storing them safely, rather than treating them as ordinary, exposable data.

Related Tools You May Need Next

JSON Formatter. Format and inspect the JSON in a token payload.

JSON Viewer. View the JSON in a token payload as a readable tree.

Base64 Encode Decode. Decode other Base64-encoded data.

Unix Timestamp Converter. Turn exp and iat numbers into readable dates.

SHA256 Generator. Hash data for integrity checks.

3D illustration of a JWT token being decoded into its parts with a security shield

Frequently Asked Questions

How do I decode a JWT?

Paste the JSON Web Token, using a test or example token rather than a real one, into the input, and click Decode. The tool splits it into its parts and decodes the header and payload, showing their contents as readable JSON. The header reveals information like the algorithm, and the payload reveals the claims, the data the token carries. This lets you inspect what a token contains for debugging or learning. Remember that decoding only reveals the contents; it does not verify that the token is genuine, which requires checking the signature.

What does the decoder show — and what does it not show?

It shows the header and the payload, each pretty-printed as JSON with its own Copy button. It never shows the signature — the third part of the token is ignored entirely. It also gives no verdict of any kind: no "valid", no "expired", no expiry date.

What is the difference between decoding and verifying a JWT?

Decoding reveals a token's header and payload contents, which anyone can do since these parts are encoded, not encrypted. It shows what the token claims but says nothing about whether the token is genuine. Verifying involves checking the token's signature, which requires the secret or key, and confirms the token's authenticity and integrity, that it has not been tampered with and comes from a trusted source. A decoder only decodes; it does not verify. So decoded contents show what a token claims, not that those claims are trustworthy.

Is a JWT payload encrypted?

No, and this is crucial to understand. The header and payload of a JWT are encoded, not encrypted, using a standard, reversible format. This means anyone who has the token can decode and read the header and payload contents; they are not secret. This is why a JWT should never carry secret or sensitive information in its payload, since it is readable by anyone with the token. The signature provides integrity, allowing verification that the token is untampered, but it does not make the payload contents secret or hidden.

Is it safe to paste a token into a JWT decoder?

You should never paste real production or sensitive tokens into any online tool. Because a JWT's payload is encoded, not encrypted, its contents are readable once decoded, and exposing a real token could compromise the data it carries or the token itself. For decoding and learning, use only test or example tokens, never real ones. Real tokens should be handled securely and kept private, since they can grant access if obtained by others. This decoder runs entirely in your browser, so nothing is uploaded — but that does not make pasting a production token safe.

Why should I never put secrets in a JWT payload?

Because the payload is encoded, not encrypted, so anyone who has the token can decode and read its contents. If you place secret or sensitive information in the payload, thinking it is hidden, that information is actually readable by anyone who obtains the token. Only non-secret claims, the kind of data that is acceptable for anyone with the token to see, belong in a JWT payload. Secrets must be kept elsewhere, secured properly, never encoded into a token payload where they are exposed to anyone holding the token.

Can a JWT decoder tell me if a token is valid?

No. A decoder cannot tell you whether a token is valid, genuine or untampered. Decoding only reveals what the token claims. Validity is established by verifying the signature with the secret or key, which this tool does not do. A forged token decodes just as cleanly as a genuine one, so a successful decode is never proof of validity.

What if my token has only two parts (no signature)?

It still decodes fine: the tool needs at least two dot-separated parts and decodes the first two. A two-part token has no signature at all, so it cannot be verified by anyone — treat its claims with even more caution.

How do I read the exp or iat number as a date?

The decoder shows these claims only as raw numbers — seconds since 1 January 1970. For example, iat 1516239022 is 2018-01-18 01:30:22 UTC. Paste the number into the Unix Timestamp Converter to see the date and time, and to judge whether a token has expired.

Is the JWT decoder free?

Yes, it is completely free with no account and no usage limit. It runs entirely in your browser, so your token is never uploaded or stored.