Frequently Asked Questions
What is a JWT?
JSON Web Token (JWT) is an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between parties as a JSON object. This information can be verified and trusted because it is digitally signed.
What is the structure of a JWT token?
A JWT consists of three parts separated by dots (.): Header, Payload, and Signature.
- Header: Typically consists of two parts: the type of the token (JWT) and the signing algorithm being used.
- Payload: Contains the claims. Claims are statements about an entity (typically, the user) and additional data.
- Signature: Used to verify the message wasn't changed along the way, created using the encoded header, encoded payload, a secret, and the specified algorithm.
Is it safe to use this tool with real secrets?
Yes, this tool processes everything client-side in your browser using the Web Crypto API. Your secrets and payload data are never sent to our servers. However, as a best practice, you should never paste production secrets into any online tool. Use this for debugging and development only.
What is the difference between HS256, HS384, and HS512?
These are HMAC algorithms using different SHA hash functions. HS256 uses SHA-256 (256-bit hash), HS384 uses SHA-384, and HS512 uses SHA-512. Higher numbers provide stronger security but produce slightly larger signatures and may require more computational power, though the difference is usually negligible for most applications.
How long should a JWT token be valid?
Access tokens should generally have a short lifespan (e.g., 15 minutes to 1 hour) to minimize the risk if a token is compromised. For longer sessions, it's recommended to use a refresh token mechanism where a long-lived refresh token is used to obtain new short-lived access tokens.