{
  "slug": "jwt-sign",
  "name": "gizza-ai/jwt-sign",
  "version": "0.1.0",
  "title": "JWT Sign — Create a signed JSON Web Token (HS/RS/ES) — gizza.ai",
  "description": "Sign a JSON Web Token (JWT) from a payload with HS256/384/512, RS256/384/512 or ES256/384 in your browser. The secret and key never leave your device.",
  "tags": [
    "jwt sign",
    "jwt generator",
    "json web token",
    "jws",
    "hs256",
    "rs256",
    "es256",
    "jwt encoder"
  ],
  "category": "security",
  "urls": {
    "page": "https://gizza.ai/tools/jwt-sign/",
    "markdown": "https://gizza.ai/tools/jwt-sign/index.md",
    "descriptor": "https://gizza.ai/tools/jwt-sign/tool.json",
    "deep_link_example": "https://gizza.ai/tools/jwt-sign/?payload=%7B%22sub%22%3A%221234567890%22%2C%22name%22%3A%22Ada%20Lovelace%22%2C%22iat%22%3A1893456000%7D&secret=your-256-bit-secret%20%20%20%28or%20paste%20a%20PEM%20private%20key%20for%20RS%2A%2FES%2A%29&algorithm=HS256&header=%7B%22kid%22%3A%22key-1%22%7D"
  },
  "cli": "gizza tool jwt-sign '{\"sub\":\"1234567890\",\"name\":\"Ada Lovelace\",\"iat\":1893456000}' 'secret=your-256-bit-secret   (or paste a PEM private key for RS*/ES*)'",
  "tool": {
    "description": "Build and sign a JSON Web Token (JWT, JWS compact serialization) from a header and payload. algorithm=HS256 (default), HS384, HS512 (HMAC with a shared secret), RS256/384/512 (RSASSA-PKCS1-v1_5 with a PEM RSA private key), or ES256/384 (ECDSA with a PEM P-256/P-384 private key). 'payload' is the JSON claims object; 'secret' is the HMAC secret (HS*) or PEM private key (RS*/ES*); optional 'header' adds JOSE header fields (alg is set automatically, typ defaults to JWT). Returns the compact JWT string. Runs locally — the secret/key and claims never leave the device.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "algorithm": {
          "default": "HS256",
          "description": "Signing algorithm: HS256/384/512 (HMAC), RS256/384/512 (RSA PKCS#1 v1.5), or ES256/384 (ECDSA). Default HS256.",
          "enum": [
            "HS256",
            "HS384",
            "HS512",
            "RS256",
            "RS384",
            "RS512",
            "ES256",
            "ES384"
          ],
          "type": "string"
        },
        "header": {
          "description": "Optional extra JOSE header fields as a JSON object, e.g. {\"kid\":\"key-1\"}. 'alg' is always set from the chosen algorithm and 'typ' defaults to 'JWT'.",
          "type": "string"
        },
        "payload": {
          "description": "The JWT claims set as a JSON object, e.g. {\"sub\":\"123\",\"name\":\"Ada\",\"exp\":1893456000}.",
          "type": "string"
        },
        "secret": {
          "description": "The signing key: for HS* the shared HMAC secret string; for RS*/ES* a PEM-encoded private key (PKCS#8 '-----BEGIN PRIVATE KEY-----', or PKCS#1 for RSA).",
          "type": "string"
        }
      },
      "required": [
        "payload",
        "secret"
      ],
      "type": "object"
    }
  }
}