piapia123
en

JWT Decoder & Verifier (HS256 / HS384 / HS512)

Encoding

Everything runs locally in your browser — nothing is uploaded

Input
Drop a file here to load its contents
Output

Split a JWT into its header, payload and signature, format all three, and turn the iat, nbf and exp claims into readable dates with a clear expiry flag. This tool can also verify an HS256 / HS384 / HS512 signature with a secret you supply — if the secret and signature line up, the content signed with that secret has not been altered. ⚠️ Three things up front. First, never paste a production secret. Everything here runs locally and nothing is uploaded, but pasting a production key into a web page is a bad habit in itself — use a test secret. Second, a token whose alg is none must be treated as invalid when a secret is supplied — the classic JWT vulnerability. Third, a verified signature does not mean the token is still valid — check exp, nbf, aud and iss; the tool reports expiry and nbf separately. With no secret it only decodes, and signatureVerification says not-performed. The payload is plaintext (Base64URL is an encoding, not encryption), so keep passwords and other secrets out of it.

Features

  • ⚠️ Never use a production secret — use a test one (everything runs locally, but pasting a production key into a page is the wrong habit)
  • Verify HS256 / HS384 / HS512 signatures with your secret, using a constant-time comparison that never returns on a matching prefix
  • ⚠️ A token with alg none is invalid once a secret is supplied (the classic JWT vulnerability)
  • ⚠️ A verified signature only means the content was not altered — not that the token is still valid; exp and nbf are reported, aud and iss are yours to check
  • With no secret it decodes only, and says so in the output
  • The secret may be UTF-8 text or Base64 (many keys are exported as Base64)
  • Splits and formats the header, payload and signature
  • Converts iat, nbf and exp into ISO timestamps and reports expiry / not-yet-valid
  • Accepts unpadded Base64URL, a Bearer prefix and line-wrapped tokens
  • Explains a wrong segment count, and reports a 5-part token as encrypted JWE rather than a JWT
  • Token size, and whether common servers would reject it: nginx 8 KB per line, Apache 8190, IIS 16384, Node 16 KB, Go 1 MB

How to use

  1. Paste the token, with or without a Bearer prefix
  2. To verify, enter the secret and choose UTF-8 text or Base64; leave it empty to decode only
  3. Read the verification verdict, the three segments and the timestamps
  4. Click Copy to take the result — a verified signature still does not mean the token is valid

FAQ

Is it safe to paste my secret here?
⚠️ Do not use a production secret. Every computation happens in your browser and the secret is never uploaded (it keeps working offline once loaded). The problem is not transmission but habit: pasting a production key into a web page, where it lingers in history or the clipboard, is something you should not do. Use a dedicated test secret to check how the tool behaves.
The signature verified, so the token is valid — right?
No. A verified signature only means the content signed with that secret was not altered. Whether the token is still usable also depends on exp (expired?), nbf (in effect yet?), aud and iss (for whom, from whom) — the tool reports exp and nbf for you, while aud and iss are yours to check. Also, this tool only verifies symmetric HS256 / HS384 / HS512; RS256 and ES256 need a public key and are out of scope.
What happens with alg none?
It is treated as invalid when a secret is supplied. This is the classic JWT vulnerability: an attacker sets alg to none, drops the signature, and a naive implementation that skips verification for none accepts any forged token. This tool treats secret-supplied plus alg none as a verification failure rather than a skip.
Should the secret be text or Base64?
An HMAC secret is a sequence of bytes, and bytes have more than one spelling. jwt.io-style values like `your-256-bit-secret` are used as UTF-8 text, so pick UTF-8 text. If your key is a Base64 string someone handed you (a binary key exported from a config or vault), pick Base64 and the tool decodes it to raw bytes first — the two choices produce entirely different signatures, and the wrong one fails.
Is the payload encrypted?
No. Base64URL is an encoding, not encryption, so anyone holding the token can read everything inside it — which is precisely what this tool does. Never put passwords, phone numbers or identity numbers in a JWT payload. If you need confidentiality, use JWE, which produces a 5-part token this tool cannot read.
Whose clock decides whether it expired?
Yours. The expiry flag compares exp against your machine time, so a wrong system clock gives a wrong answer. The authoritative expiry check always belongs on the server, since a client clock can be set to anything.

Related tools