Skip to main content

JWT Decoder, Generator & Verifier

Decode JWT claims, verify HMAC signatures, and generate short-lived HS256 test tokens

Tokens, secrets, and payloads stay in this tab and clear when you reload or leave. Decoding, HMAC verification, and HS256 test-token generation run in your browser.

Decoding does not verify a signature. Maximum 65,536 characters.

Decoded Token

Paste a three-part JWT to inspect its header and payload. Decoding does not verify the signature.

Was this JWT Decoder, Generator & Verifier helpful?

Help us keep tools reliable, fast, and bug-free.

What you can do with JWT Decoder, Generator & Verifier

  • See inside jwt token
  • Verify jwt signature
  • Generate jwt

How this security utility works

Decode compact JWT headers and claims, verify HMAC signatures, or create a short-lived HS256 test token in the browser.

Example input

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c2VyLTQyIiwicm9sZSI6InJlYWRlciIsImlhdCI6MTc2MjM1ODQwMCwiZXhwIjoxODkzNDU2MDAwfQ.W_Owfzi38CD749oBEnS3U0AgK-1kH58QzbJpE4grGCA

Example output

Decoded Header: {
  "alg": "HS256",
  "typ": "JWT"
}
Decoded Payload: {
  "sub": "user-42",
  "role": "reader",
  "iat": 1762358400,
  "exp": 1893456000
}

Practical workflow

  1. Paste a three-part compact JWT in Decode to inspect its protected header and JSON claims; this view does not verify its signature.
  2. Open Verify, enter the same shared secret used to sign an HMAC token, and check the verification result. HS256, HS384, and HS512 are supported.
  3. Open Generate, enter a JSON object and a test secret, then create an HS256 token. The result receives the current iat and an exp two hours later and appears in Decode.
  4. Use Copy generated JWT to copy that displayed token. Never use a sample secret or an unreviewed test token as a production credential.

Common use cases

  • Inspecting the subject, role, issuer, and time claims in a synthetic compact JWT during local API development.
  • Checking whether a locally supplied HS256, HS384, or HS512 token matches its shared test secret and standard expiration claims.
  • Creating a short-lived HS256 fixture for a local integration test that expects a signed bearer token.

Important notes and limitations

  • Decoding only Base64Url-decodes the header and payload; it does not authenticate the sender. A signed JWT is not encrypted, so its claims are readable by anyone holding it.
  • Verification accepts HMAC HS256, HS384, and HS512 with a shared secret. RSA, ECDSA, encrypted JWE tokens, and public-key verification are not supported. Generation creates HS256 only and sets iat to the current time and exp to two hours later.
  • Tokens, secrets, and payloads stay in the open tab and are not uploaded or saved. Reloading or leaving clears them; cleanup of legacy localStorage drafts is best-effort. The token and JSON payload are limited to 65,536 characters, and secrets to 4,096 characters. Base64Url expands payloads, so a JSON payload under its own limit may still be rejected if the final encoded JWT exceeds 65,536 characters. Generation requires a non-empty secret; use at least 32 UTF-8 bytes for test keys and never use a sample secret in production.

Terminal & CLI equivalents

Verify HMAC-SHA256 signature with OpenSSL

openssl dgst -sha256 -hmac "your_secret" <(echo -n "header.payload")

Computes raw binary HMAC-SHA256 signature to verify whether a JWT was altered.

Step CLI token inspection

step crypto jwt inspect --insecure <token>

Decodes header and claims offline on the terminal without communicating with an identity provider.

Extract payload with jq and base64

echo "<token>" | cut -d. -f2 | base64 --decode 2>/dev/null | jq .

Quick terminal one-liner to parse and pretty-print JWT payload claims on Linux or macOS.

JWT Signing Algorithm Security Comparison

AlgorithmKey TypeSignature SizeVerification SpeedSecurity Recommendation
HS256 (HMAC-SHA256)Symmetric Shared Secret256 bits (32 bytes)Fastest (<0.1ms)Use minimum 256-bit secret; insecure if shared with frontend clients
RS256 (RSA-SHA256)Asymmetric Public/Private2048-4096 bitsModerate (~1ms)Standard for OAuth2 / OIDC; public key can be safely published at jwks.json
ES256 (ECDSA P-256)Asymmetric Elliptic Curve512 bits (64 bytes)Fast (<0.5ms)Modern lightweight standard with compact signature size for mobile & edge
EdDSA (Ed25519)Asymmetric Edwards Curve512 bits (64 bytes)Very Fast (<0.3ms)Resistant to side-channel timing attacks; recommended for new high-security services

Common errors & troubleshooting

JsonWebTokenError: invalid signature

Cause: Secret encoding mismatch (e.g. raw UTF-8 string verified as Base64/Hex), or token payload was tampered with.

Solution: Confirm whether the shared secret is stored as raw text, hex, or base64, and verify signature algorithm parity.

TokenExpiredError: jwt expired

Cause: Current Unix epoch time exceeds the 'exp' timestamp specified in the token payload.

Solution: Re-authenticate to issue a fresh token, or configure 30-60 seconds of clockSkew tolerance in verifying middleware.

Continue your workflow

Frequently asked questions

Can anyone read the payload of a standard JSON Web Token?

Yes. Standard JWTs are signed, not encrypted. Their payload is Base64Url encoded and can be read by anyone unless encrypted with JWE (JSON Web Encryption).

Which JWT signature algorithms can this page verify and generate?

It verifies HMAC HS256, HS384, and HS512 signatures using a shared secret. It generates HS256 only. RSA and ECDSA public-key signatures and encrypted JWE tokens are not supported.

What does the exp (expiration) claim timestamp represent in a JWT?

The exp claim is a Unix timestamp (seconds since January 1, 1970) indicating the exact moment after which the token must no longer be accepted for authentication.

Does decoding a JWT prove that its claims are authentic?

No. Decode only reads the Base64Url-encoded header and payload. Use Verify with the correct shared HMAC secret to check a supported signature and standard time claims; never trust decoded claims by themselves.