{"ok":true,"result":{"slug":"jwt-encoder","name":"JWT Encoder","summary":"Sign a JWT (HS256/384/512 with a shared secret, or RS/PS/ES with a PEM private key), or verify a token's signature and exp/nbf/iat claims.","description":"Create and sign JSON Web Tokens with HS256, RS256, PS256 or ES256, add iat and exp in one click, and verify a token's signature and expiry. Runs in your browser.","method":"POST","endpoint":"/api/v1/tools/jwt-encoder","plan":"free","mcpName":"jwt_encoder","input":{"type":"object","additionalProperties":false,"properties":{"mode":{"type":"string","description":"sign: build and sign a token from header and payload. verify: check token's signature and time claims.","default":"sign","enum":["sign","verify"],"maxLength":200000},"alg":{"type":"string","description":"Signing algorithm. HS* use a shared secret; RS*/PS* need an RSA key; ES256/ES384 an EC P-256/P-384 key.","default":"HS256","enum":["HS256","HS384","HS512","RS256","RS384","RS512","PS256","ES256","ES384"],"maxLength":200000},"key":{"type":"string","description":"HS*: the shared secret. Otherwise a PEM key: PKCS#8 PRIVATE KEY to sign, SPKI PUBLIC KEY to verify.","maxLength":20000},"keyEncoding":{"type":"string","description":"How an HS* secret is written: text (UTF-8) or base64.","default":"text","enum":["text","base64"],"maxLength":200000},"payload":{"type":"string","description":"Sign: the claims as a JSON object, e.g. {\"sub\":\"123\",\"iat\":1700000000}.","default":"{}","maxLength":200000},"header":{"type":"string","description":"Sign: extra header fields as a JSON object; alg is always set from \"alg\".","default":"{\"typ\":\"JWT\"}","maxLength":200000},"token":{"type":"string","description":"Verify: the compact JWT to check.","maxLength":20000},"now":{"type":"number","description":"Verify: Unix time in seconds to check exp/nbf/iat against. Defaults to now.","minimum":0},"skew":{"type":"integer","description":"Verify: allowed clock difference in seconds.","default":0,"minimum":0,"maximum":86400}},"required":["key"]},"example":{"mode":"sign","alg":"HS256","key":"a-string-secret-at-least-256-bits-long","payload":"{\"sub\":\"1234567890\",\"name\":\"Ada\",\"iat\":1700000000}"},"randomOutput":false,"network":false,"docs":"https://pithlab.com/developers/tools/jwt-encoder","page":"https://pithlab.com/tools/jwt-encoder"}}