Online JWT debugger

A JWT is three Base64URL segments separated by dots: header, payload, and signature. This page decodes the first two as JSON, shows the header alg, and optionally verifies the signature. HS256 through HS512 need the same shared secret the issuer used. RS256 through RS512, PS256 through PS512, and ES256 through ES512 need an SPKI PEM public key (BEGIN PUBLIC KEY). Tokens are signed, not encrypted, so anyone with the string can read claims such as sub and exp. alg none and EdDSA are not verified here. To mint a new token, use the JWT encoder.

What the three dotted segments of a JWT reveal before signature check

A JSON Web Token is one compact string with three pieces separated by dots. The first piece is the header, the second is the payload, and the third is the signature. Each piece uses Base64URL, which is Base64 with URL-safe spelling: minus instead of plus, underscore instead of slash, and padding often omitted. Decode turns header and payload into JSON. The header normally carries typ JWT and alg naming the signing method. The payload carries claims such as sub, exp, and iat. The signature is raw bytes in Base64URL form, not another JSON object.

A JWT is signed, not encrypted. Anyone who holds the string can Base64URL-decode the middle segment and read claim values. Signing proves the issuer had a key and that header and payload were not altered after signing. It does not hide usernames, roles, or internal IDs from people who can copy the token. Confidential fields belong inside encrypted envelopes such as JWE, or they should stay off the wire. The alg field tells you whether verification needs a shared secret or an asymmetric public key.

Symmetric algorithms HS256, HS384, and HS512 use HMAC with a shared secret; see HMAC for how keyed digests differ from bare hashes. RS256 through RS512 sign with RSA PKCS#1 and a matching hash. PS256 through PS512 use RSA-PSS padding. ES256 through ES512 use ECDSA on named curves. Those asymmetric families verify with an SPKI PEM public key as documented on RSA cipher. This page decodes structure, reads claims, and checks signatures when you supply the right key. To build a new signed token, use JWT encoder. Header alg none is not accepted for verification here.

How Base64URL segments, typ and alg, claims, and key material fit together

Why every JWT splits into exactly three Base64URL segments between dot characters

  1. The signing input is the UTF-8 bytes of header, a dot, and payload, both still in Base64URL form as they appear in the token.
  2. The third segment is the signature over that input. Missing dots, extra dots, or empty segments break the compact serialization rules from RFC 7519.
  3. Decode on this page parses the split first. Only after two valid JSON objects appear in header and payload does signature verification become meaningful.

Why header typ and alg must be read before you trust payload claim values

  1. typ JWT marks the object as a JSON Web Token rather than some other JOSE type your library might accept.
  2. alg names the algorithm for the third segment. HS family means HMAC. RS and PS mean RSA with different padding. ES means ECDSA with a named curve.
  3. Libraries should reject a mismatch between alg and the key you provide. Reading alg here tells you whether to paste a shared secret or an SPKI public PEM.

Why exp, iat, and sub claims use NumericDate seconds rather than millisecond timestamps

  1. exp is seconds since the Unix epoch when the token should stop being accepted, unless your policy ignores it locally.
  2. iat records issue time in the same second units. nbf can forbid use before a start instant with the same NumericDate shape.
  3. A millisecond wall clock pasted into exp looks decades in the future when parsers treat it as seconds. Compare claim numbers with a timestamp line in seconds before you blame signature failure.

Why HS256 family secrets and RS PS ES public keys are not interchangeable verify inputs

  1. HS256, HS384, and HS512 need the same symmetric secret the issuer used. Wrong secret yields a failed verify even when JSON claims look fine.
  2. RS256, RS384, RS512, PS256, PS384, PS512, ES256, ES384, and ES512 need the issuer matching public key in SPKI PEM form, not the private key and not an HMAC string.
  3. Choosing verify input from alg avoids treating a PEM block as UTF-8 secret material or vice versa. JWT encoder signs with the private or secret side of the same pairing.

Where decoded JSON looks fine but verification or expiry still disagree

Valid structure and readable claims with a signature that never validates

Header and payload JSON can parse while the third segment still fails against your key. HS family tokens need the exact shared secret bytes the issuer signed with, not a rotated staging secret. RS, PS, and ES tokens need the correct SPKI public PEM, including any certificate chain trimming your issuer documents. Swapping test and production keys is a common cause when sub and exp already look plausible.

An exp claim that appears to expire centuries after the real session ended

RFC 7519 NumericDate counts seconds, not milliseconds. Pasting a thirteen-digit millisecond clock into exp makes parsers think the token stays valid for an absurd horizon. iat and nbf follow the same unit rule. Cross-check the numeric claim against civil time on the timestamp tool in seconds before you assume the signing key is wrong.

A token whose header advertises alg none or ships without a third segment

Unsigned tokens may still decode for debugging, but they carry no integrity proof. Production APIs should reject alg none outright. This page treats alg none as unsupported for verify and warns when the signature segment is absent. For a legitimately signed replacement, issue a new token on JWT encoder with a supported alg and a real secret or key pair.

Common questions

What are the three parts of a JWT?
They are header, payload, and signature, written as three Base64URL chunks separated by dots. The header and payload decode to JSON objects. The signature is bytes proving the issuer signed the dot-separated signing input. RFC 7519 defines the compact form. This page shows pretty-printed JSON for the first two parts and runs verify on the third when you supply a key.
How is Base64URL different from ordinary Base64?
Both represent binary data in text. Base64URL swaps plus for minus and slash for underscore so tokens survive URLs and headers without extra escaping. Padding equals signs are often dropped in JWTs. The same logical bytes can look different in standard Base64 and Base64URL spelling. Base64 explains the alphabet mapping when you convert between wire forms.
What do exp, iat, and sub mean in the payload?
sub names the subject, often a stable user or client id. exp is NumericDate seconds after which verifiers should treat the token as expired unless local policy says otherwise. iat is issue time in the same seconds. Optional nbf forbids use before a start second. None of these claims encrypt anything; they are plain JSON numbers and strings after decode.
Is a JWT encrypted or only signed?
Standard JWT is signed, not encrypted. The payload is readable by anyone who obtains the string. Signing detects tampering and ties the blob to a key holder. Hiding content requires JWE or transport TLS, not alg alone. Treat tokens like bearer credentials: possession matters even when fields look anonymous.
Which signature algorithms can this page verify?
Verification supports HMAC HS256, HS384, and HS512 with a shared secret. It supports RSA PKCS#1 RS256, RS384, and RS512 with an SPKI PEM public key. It supports RSA-PSS PS256, PS384, and PS512 with the same public key shape. It supports ECDSA ES256, ES384, and ES512 with an SPKI PEM public key on the named curves. It does not support alg none, EdDSA variants such as Ed25519, or other algs outside that list. Public keys must use BEGIN PUBLIC KEY SPKI PEM.
What is the difference between HS256 and RS256?
HS256 is HMAC with SHA-256 using one shared secret both sides know. RS256 is RSA PKCS#1 signature with SHA-256: the issuer signs with a private key and verifiers check with the public key. Symmetric HS is simple but every verifier must hold the secret. Asymmetric RS lets APIs publish only a public PEM while signing stays on the issuer. HMAC and RSA cipher explain the primitives behind each family.
Why is alg none not supported for verification?
alg none means no integrity protection. Attackers could alter payload JSON and still pass naive parsers. Security guidance tells servers to reject none in production. This debugger may still decode unsigned tokens for inspection, but verify refuses none because there is nothing cryptographic to check. Issue signed tokens with HS, RS, PS, or ES on JWT encoder instead.
What key should I paste for HS versus RS, PS, or ES?
When alg is HS256, HS384, or HS512, paste the symmetric secret string or raw key bytes your issuer documents, not a PEM certificate. When alg is RS, PS, or ES, paste the issuer public key as SPKI PEM with a BEGIN PUBLIC KEY header. Private signing keys belong on the encoder page, not in the verify field. Mismatch between alg and key type produces a failed verify even when JSON looks perfect.
What is the difference between decoding and verifying a JWT?
Decoding only Base64URL-parses header and payload into JSON. It does not prove the issuer signed them or that bytes stayed intact. Verifying recomputes the signature over the signing input with your secret or public key and compares the result to the third segment. Readable claims without verify are fine for debugging copy-paste errors; accepting them as authoritative in an API still requires a successful verify step.
How do I create a new signed JWT with the same claims?
Use JWT encoder to edit header and payload JSON, pick a supported alg, and supply the signing secret or private PEM. The encoder writes the compact three-part string this page accepts. Keep header alg aligned with your verify key material on both tools. Rotate secrets or keys on the issuer side when verify starts failing after deployment changes.