Search and jump to any tool. Type to filter; use arrow keys to move and Enter to select.
Builds and signs JSON Web Tokens with HMAC using SHA-256, SHA-384 or SHA-512.
Builds and signs JSON Web Tokens with HMAC using SHA-256, SHA-384 or SHA-512. Edit the header and payload as JSON, add registered claims with helper buttons, pick an expiry, and get a signed token plus a readout of its time claims. Signing runs in the browser through WebCrypto, so the secret is not transmitted.
Header: {"typ":"JWT"}
Payload: {"sub":"1234567890","name":"John Doe","iat":1516239022}
Secret: your-256-bit-secret
Algorithm: HS256, with both Set iat and Set exp switched offThree dot-separated parts. Part 1, the header: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9. Part 2, the payload: eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ. Part 3, the HMAC-SHA256 signature: 43 base64url characters. The same inputs give the same token every time, because nothing in it is random or time-based once both time claims are off.
Good to know. Use long random secrets; for HS256 that means at least 32 bytes. The tool signs tokens but does not verify tokens from elsewhere, and it does not judge claim meaning, such as whether exp already lies in the past.
The alg header is always set to match the algorithm you pick here.
Used only to derive a non-extractable HMAC key inside your browser.