JWT Decoder & Encoder

Decode, verify, and sign JSON Web Tokens - HS, RS, PS, ES, EdDSA. 100% client-side, nothing leaves your browser.

Generate example

Paste a JWT below that you'd like to decode, validate, and verify.

JSON Web Token (JWT)

                        

                        

Enter the secret used to sign the JWT below:

Secret

What is a JSON Web Token?

A JSON Web Token (JWT) is an open standard (RFC 7519) for securely transmitting information between parties as a compact, URL-safe string. A JWT consists of three base64url-encoded segments separated by dots: header.payload.signature.

What this tool does

Supported algorithms

How to use the decoder

  1. Paste a token into Encoded Token. Spaces and line breaks are removed automatically, and the three parts are coloured so you can see where each one starts.
  2. Read the Decoded Header and Decoded Payload. Switch either panel to Claims Breakdown for a table that names each standard claim and shows time claims as a readable UTC date.
  3. Check the status line under the token. It confirms the structure, and warns when exp is in the past or nbf is still in the future.
  4. To verify, paste the HMAC secret or, for RS, PS, ES and EdDSA tokens, the PEM public key into the verification box. Turn on BASE64URL ENCODED if your secret is stored in that form. The result reads Signature Verified or Invalid Signature.
  5. Use the JWT Encoder tab to edit a header and payload and sign a new token, or pick an algorithm under Generate example to get a ready-made token with a matching secret or key pair.

Anatomy of a real token

The header {"alg":"HS256","typ":"JWT"} encoded with base64url is eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9. The payload {"sub":"1234567890","name":"John Doe","admin":true,"iat":1516239022} becomes eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0. The signature is an HMAC-SHA256 of those two strings joined by a dot, computed with the secret, and encoded the same way. The iat value is a count of seconds since 1 January 1970, so 1516239022 means 18 January 2018 at 01:30:22 UTC.

Decoding is not verifying

Base64url is an encoding, not encryption. Anyone who holds a JWT can read its payload in seconds, exactly as this page does, so never put passwords, card numbers or other secrets in a claim. Reading a token also proves nothing about who issued it. Only checking the signature with the right key shows that the header and payload have not been changed. A server that accepts a token should verify the signature, reject tokens whose alg it does not expect (including none), and check exp, iss and aud before trusting any claim.

Common mistakes

Privacy & security

All decoding, signing, and verification happens locally in your browser using the native Web Crypto API. No tokens or keys are ever sent to our servers. Even so, treat a live production token like a password, and prefer test tokens when you can.

Frequently Asked Questions

Is my token sent to a server?
No. Decoding, verifying, and signing all run locally using the browser's native Web Crypto API. Nothing is uploaded or logged.
Which signing algorithms are supported?
HS256/384/512, RS256/384/512, PS256/384/512, ES256/384/512, and EdDSA (Ed25519 and Ed448).
Can I verify a token without the secret or public key?
You can decode the header and payload without any key - decoding is just Base64URL. Verifying the signature requires the matching secret (HS) or public key (RS/PS/ES/EdDSA).
What is the difference between decoding and verifying?
Decoding reads the header and payload without checking authenticity - anyone can decode a JWT. Verifying additionally checks the cryptographic signature against a key, confirming the token was not tampered with.
Why did verification fail?
The most common causes are a wrong key/secret, a mismatched algorithm, or a token that was modified after signing. Check that you copied the exact key used to sign it.