How to Build and Re-Sign a JWT
Unlike simple viewers, this tool features a full two-way binding JWT Builder. You can paste an existing token to decode it, or you can write your own JSON payload from scratch directly in the editors above.
- Edit the JSON: Click into the Payload block and modify the data (e.g., change
"role": "user"to"role": "admin"). - Enter your Secret: Paste your backend HMAC secret key into the verification box.
- Instant Generation: The tool will automatically calculate a new cryptographically secure signature (using HS256, HS384, or HS512) and output the valid JWT string into the top input box. You can then copy it as a Bearer header.
The Base64 Misconception: Encoded, Not Encrypted
The single most dangerous misconception in web security is that JSON Web Tokens hide data from the user. They do not.
Never Store Sensitive Data
The Header and Payload of a standard JWT are merely Base64Url encoded. Encoding is not encryption. Anyone who intercepts the token can simply paste it into a decoder and instantly read the JSON payload. If you store passwords, Social Security Numbers, or internal database secrets inside the payload, they are publicly visible.
Symmetric vs Asymmetric Signing
If anyone can decode the payload, how are JWTs secure? The security comes entirely from the Signature. If a user modifies the payload, the signature will instantly become invalid unless they also possess the secret key.
- HMAC (HS256/384/512): Symmetric signing. The server uses a single "Secret Key" to both create the signature and verify it. This is incredibly fast but dangerous if the secret is leaked, as attackers can forge tokens.
- RSA/ECDSA (RS256, ES256): Asymmetric signing. The server uses a hidden Private Key to sign the token. A distributed Public Key is used by other microservices to verify the token. This is the enterprise standard (OAuth2/Auth0) because services can verify tokens without knowing how to forge them.
Understanding Standard Claims
JWT payloads utilize standardized 3-letter acronyms (Claims) to keep the token size as small as possible. The Claims Inspector above automatically parses these for you:
exp
Expiration Time: The exact Unix timestamp when the token permanently expires.
iat
Issued At: The timestamp of when the token was originally generated.
sub
Subject: The unique ID of the user or entity holding the token.