FormatterHQ

JWT Decoder & Verifier

Paste a JSON Web Token to see its header and claims with readable dates, check whether it has expired, verify its signature with your key, or sign a test token.

Loading tool…
Ready.

How to use the JWT Decoder

  1. On the Decode & verify tab, paste the token into the token box — a leading Bearer prefix is fine — or click Sample.
  2. Read the colour-coded header, payload and signature parts, the decoded header and payload, and the Claims table with dates and expiry status.
  3. To check the signature, enter the HMAC secret or the issuer’s public key (PEM, X.509 certificate or JWK) in the key field.
  4. Switch to the Encode tab to build and sign a test token with HS256, HS384 or HS512, then copy it or decode it again.

JWT decoder, verifier and test-token builder

A JSON Web Token (RFC 7519) is three Base64URL-encoded parts joined by dots: header.payload.signature. This JWT decoder splits a token into its colour-coded parts, decodes the header and payload into formatted JSON, explains each claim in a table with human-readable dates, tells you whether the token has expired, and — if you supply the key — verifies the signature. An Encode tab lets you create signed test tokens for your own development work.

Example

The decoded header and payload of a typical access token:

{
  "alg": "RS256",
  "typ": "JWT",
  "kid": "k1"
}

{
  "sub": "42",
  "name": "Ada",
  "iat": 1767225600,
  "exp": 1767229200,
  "iss": "https://auth.example.com"
}

Here iat is 2026-01-01 00:00:00 UTC and exp one hour later; the claims table shows those dates and whether the token is still valid right now.

What the fields mean

ClaimMeaning
algSigning algorithm, e.g. HS256 (HMAC-SHA256), RS256 (RSA), ES256 (ECDSA) or EdDSA
kidKey ID — which of the issuer’s keys signed the token
iss / aud / subIssuer, intended audience and subject (usually a user ID)
iat / nbf / expIssued-at, not-before and expiry times in Unix seconds

For other timestamps, the Unix Timestamp Converter is handy.

Decoding is not verifying

The header and payload of a signed JWT (JWS) are only encoded, not encrypted, so anyone can read them — and anyone can edit them. Only the signature proves that the issuer created the token and that nobody changed it. That is why the verification step matters:

  • HS256, HS384, HS512 use a shared secret: paste the same secret the server uses (as text, or Base64URL if your secret is stored that way).
  • RS, PS, ES and EdDSA algorithms use a key pair: paste the issuer’s public key as a PEM, an X.509 certificate or a JWK — for example one entry from the issuer’s JWKS endpoint.
  • Tokens with "alg": "none" are flagged as unsigned; your application should reject them unless it explicitly expects unsigned tokens.

A successful check here is a debugging aid. Your application must still verify every token on every request with a maintained JWT library, and check the issuer, audience and expiry, not just the signature.

Creating test tokens

The Encode tab builds a token from a header and payload you edit as JSON and signs it with an HMAC secret (HS256, HS384 or HS512). It is useful for testing your own API locally or reproducing a bug. Use a long random secret — at least 32 bytes for HS256 — and never sign tokens for systems you do not control.

Common errors

  • “A JWT must have three dot-separated parts”. The token was truncated or includes extra text. Copy it again from the Authorization header or cookie.
  • “not valid Base64URL” / “not valid JSON”. A character was lost or changed while copying, often at a line break.
  • Signature does not verify. Check that you used the right key (compare the kid), the full secret without extra spaces, and a public key in SPKI “PUBLIC KEY” PEM form rather than PKCS#1.

Privacy

Tokens, secrets and keys are processed in your browser and are not uploaded while you decode, verify or sign. Save & Share is different: on the Decode & verify tab the link stores the token itself on our server, and on the Encode tab it stores the header and payload. The secret or key is never included in the link. Treat live tokens like passwords anyway: a valid bearer token grants access until it expires, so prefer expired or test tokens when you share screenshots. Encrypted tokens (JWE, five parts) cannot be read without the recipient’s private key. To decode a single Base64URL part by hand, use Base64 Decode; to see how HS256 signatures are computed, try the HMAC Generator.

Frequently asked questions

Can this tool verify a JWT signature?
Yes. Enter the HMAC secret for HS256/384/512 tokens, or the issuer’s public key (PEM, X.509 certificate or JWK) for RS, PS, ES and EdDSA tokens. Verification uses the browser’s Web Crypto API.
Is it safe to paste a JWT here?
Tokens and keys are handled locally and not uploaded. Only a Save & Share link stores the token on our server — the secret or key is never part of it. Still, a valid token works like a temporary password, so avoid sharing live production tokens and prefer expired or test tokens.
Is the JWT payload encrypted?
Not in a normal signed JWT. The payload is Base64URL encoded, so anyone who has the token can read it. Only JWE tokens encrypt their contents.
How do I know when a token expires?
The claims table converts the exp claim into a date and shows whether it has already passed, together with iat and nbf.
Why does verification fail with my RSA key?
The public key may be in PKCS#1 “RSA PUBLIC KEY” format, which is not supported, or it may be the wrong key for the token’s kid. Use an SPKI “PUBLIC KEY” PEM, a certificate or the matching JWK.

Last updated October 3, 2026

Guides

Related tools

JWT Encoder & Generator Create and sign JSON Web Tokens with HS256, RS256, ES256, PS256 or EdDSA using a secret or PEM key. Signing happens in your browser. JWT Verifier Verify a JWT signature with a shared secret, PEM public key, X.509 certificate or JWKS and check exp, nbf, iss and aud claims. Base32 Decode Decode Base32 strings back to text. Padding is optional and lowercase input is accepted. Base58 Decode Decode Base58 strings (Bitcoin, Flickr or Ripple alphabet) back into readable text. Base64 Decode Decode Base64 to text online. Handles UTF-8, URL-safe Base64, missing padding and binary data downloads. HTML Decode Decode HTML entities such as &, é and € back into the characters they represent. MIME Type Lookup Find the MIME / Content-Type for a file extension or the extensions for a media type — about 150 common types. MongoDB ObjectId to Timestamp Extract the creation date from MongoDB ObjectIds and see the random and counter parts; also builds a date-range _id query. QR Code Generator Create free QR codes for URLs, text, Wi-Fi, vCards, e-mail, SMS, phone numbers, locations and events. Custom colours, PNG and SVG. QR Code Reader & Scanner Scan QR codes from an image, screenshot or your camera and see the content — links, Wi-Fi passwords, contacts — safely before opening. Regex Cheat Sheet Interactive regex cheat sheet: anchors, classes, quantifiers, groups, lookarounds, flags and Unicode, with clickable examples and a flavour table. Regex Escape Escape special characters so any text can be matched literally inside a regular expression in JavaScript, PCRE, Python or Java.