JWT decoder: read and verify a JSON Web Token
This JWT decoder shows what is inside a JSON Web Token: header, payload and signature, plus issuer, expiry and validity in plain words. If you enter the secret or the public key it can even verify the signature. The token never leaves your browser.
Source: §§ 2, 4.1 (Claims, NumericDate), IETF RFC 7519 – JSON Web Token (JWT). Updated: .
How it is calculated
A JSON Web Token (JWT) carries claims between two parties – typically after login as proof that “this user is signed in”. It has three parts separated by dots: header.payload.signature (RFC 7519, RFC 7515).
How to decode a JWT
- Paste the token into the top box (with or without “Bearer”).
- Header and payload appear at once as readable JSON, with expiry and issuer below.
- Optional: enter the key under “Secret or public key” and the tool verifies the signature.
What is inside a token
- Header: the algorithm (
alg, e.g. HS256 or RS256) and type (typ). - Payload: the claims. Registered ones include
iss(issuer),sub(subject),aud(audience),exp(expires),nbf(not before),iat(issued at) andjti(ID). Times are seconds since 1970; the tool shows them as dates in UTC. - Signature: protects against tampering if the recipient checks it with the matching key.
Important: reading is not verifying
Header and payload are only base64url-encoded, not encrypted. Anyone who sees a token can read it – passwords or other secrets do not belong in it. Without a signature check the content proves nothing, because anyone can change it. Verification here works with an HMAC secret (HS256/384/512) and a public key (RS, PS, ES); a token with alg: none is unsigned.
Protection against algorithm confusion
A known attack hands the server a token with alg: HS256 signed using the public key as the secret. The tool therefore refuses to verify when a public or private key is entered as an HS secret (RFC 8725 advises never taking the algorithm from the token alone).
Limits
- Encrypted tokens (JWE, five parts) cannot be read without the key; only the header is shown.
- Signature verification for EdDSA and certificates is not included. Whether a token is valid for your application depends on issuer, audience and expiry, which your server must check itself.
- Production tokens belong only on devices you trust. Nothing is sent or stored here, but an expired or test token is the safer choice.
Frequently asked questions
What is a JWT?
A JSON Web Token is a compact, URL-safe string of three parts (header, payload, signature). It carries claims such as user ID or expiry and is often used as proof of access after login.
Can anyone read the content of a JWT?
Yes. Header and payload are only base64url-encoded, not encrypted. Only the signature protects against tampering, not against reading. So never put secrets in a JWT.
How do I verify the signature of a JWT?
Under “Secret or public key” enter the secret for HS256/384/512, or the public key as PEM or JWK for RS256, PS256 or ES256. The result appears under “Signature”.
Is it safe to paste my token into an online decoder?
This decoder works entirely in your browser and sends nothing. Still, a valid token is proof of access. Use test tokens or already expired ones where you can.
What do exp, iat and nbf mean?
exp is the moment the token expires, iat the moment it was issued and nbf the moment it becomes valid. All three are seconds since 1 January 1970 UTC.
Why does the tool say “not verified”?
Without a key there is nothing to check the signature against, so the content is only read. Unsupported algorithms or unsuitable key formats also skip the check.
Sources and legal basis
- §§ 2, 4.1 (Claims, NumericDate): IETF RFC 7519 – JSON Web Token (JWT)
- §§ 3, 7.1, Anhang A.1 (Testbeispiel HS256): IETF RFC 7515 – JSON Web Signature (JWS)
- § 3 (HS, RS, ES, PS): IETF RFC 7518 – JSON Web Algorithms (JWA)
- §§ 2.1, 3.1 (Algorithmus-Verwechslung, Algorithmus pruefen): IETF RFC 8725 – JSON Web Token Best Current Practices
- W3C Web Cryptography API (SubtleCrypto.verify)
As of: · Editorial policy
Related tools
- Base64 Encode and DecodeEncode and decode Base64 and Base64url with proper UTF-8, plus URL encode/decode (percent-encoding). Clear error messages, runs locally in your browser.
- Hash Generator: SHA-256, SHA-512, SHA-1, MD5Calculate SHA-256, SHA-384, SHA-512, SHA-1 and MD5 hashes of text or files and verify checksums – locally in your browser, no upload, free.
- JSON formatter, validator and minifierValidate JSON against RFC 8259 with the exact line, column and a plain-English explanation. Beautify or minify, sort keys, copy. Runs locally in your browser.
- Unix timestamp converterConvert a Unix timestamp to a date and back. Seconds, milliseconds, micro- and nanoseconds detected automatically; UTC, local time, ISO 8601 and more.
- UUID generator: create and validate UUID v4 and v7Generate UUIDs online: version 4 (random) or version 7 (time-ordered), up to 1,000 at once. Validate a UUID and decode its version, variant and timestamp.
- Password GeneratorGenerate secure random passwords and memorable passphrases with entropy shown in bits — calculated right in your browser, nothing sent or stored.
- What is my IP address?What is my IP? See your public IPv4 or IPv6 address at once, plus approximate location, internet provider and browser details. Free, never stored.
- JSON Escape / UnescapeJSON escape and unescape online: turn any text into a valid JSON string with escaped quotes, backslashes and line breaks, or decode it back – in your browser.
- Font pairing – heading and body font combinationsFont pairs for headings and body text with live preview, copy-ready CSS and availability on Windows, Mac, iPhone and Android – system fonts only, no web fonts.