Encode JSON Web Token

Create HS*/RS* tokens in-browser (no server).

If empty, iat will be set to current time.
Expiration preview:
Unix (sec):
ISO UTC:
Local:
Relative: no expiration set
Custom JSON fields will be merged into payload (must be an object). Standard claims (sub/iss/aud/exp/iat) are set from the fields above and cannot be overridden by custom JSON.
Private Key, Secret and Encoded tokens stay in your browser only.
Notes:
  • HMAC: provide raw secret string. RSA: provide private key in PKCS#8 PEM form (-----BEGIN PRIVATE KEY----- ...).
  • exp: absolute takes precedence over relative. Relative value is interpreted as minutes and converted to seconds correctly.