Skip to content

Jwt Generator API

POST https://api.findutils.com/api/tools/jwt-generator/execute

Generate a signed JWT (HS256, HS384, or HS512 via HMAC) and return the token plus the decoded header and payload. The payload contains sub, name, iat, exp, and any custom claims. Asymmetric algorithms (RS*/ES*) are not supported.

Request body

application/json
  • secret

    string required

    The HMAC secret used to sign the token.

  • algorithm

    string optional

    Signing algorithm. Default: HS256. One of HS256 · HS384 · HS512. Default "HS256".

  • subject

    string optional

    The "sub" claim. Default: "1234567890". Default "1234567890".

  • name

    string optional

    The "name" claim. Default: "John Doe". Default "John Doe".

  • expires_in

    integer optional

    Seconds until expiry; exp = iat + expires_in. Default: 3600. Default 3600.

  • custom_claims

    object optional

    Extra claims merged into the payload. An object, or a JSON object string.

  • issued_at

    integer optional

    Unix timestamp (seconds) for the "iat" claim. Default: now.

Example arguments

Verified
{
  "secret": "my-secret",
  "subject": "u1",
  "name": "Ann",
  "expires_in": 3600
}