Hash Lab

Application

JWT (HS256)

A JSON Web Token signed with HMAC-SHA-256. The three dot-separated parts (header, payload, signature) are base64url-encoded. Edit the JSON or the secret and watch the signature change in real time.

For HS256, any string is fine; 32+ bytes is recommended.

Signed JWT

How HS256 works

  1. Encode header as JSON, then base64url.
  2. Encode payload as JSON, then base64url.
  3. Compute HMAC-SHA-256(secret, header + "." + payload).
  4. Base64url-encode the HMAC tag.
  5. Token = header.payload.signature.