JWT Encoder

Builds and signs an HS256 JWT as you type, using the browser's built-in Web Crypto API. The payload and secret never leave this page.

How it works

A JWT is three base64url segments joined with dots: a header, a payload and a signature. The header here is fixed to {"alg":"HS256","typ":"JWT"} — HS256 only, to keep this tool to a single shared-secret workflow. The signature is computed with crypto.subtle.sign, the same Web Crypto primitive browsers and Node both implement, over the header and payload segments joined by a dot. Changing the payload or the secret by even one character produces a completely different token.