https://devtools.solutions/tools/security/jwt-generate.html

Generate JWT

Build and sign a JSON Web Token with a custom header, payload, and secret using HMAC-SHA256. Runs in your browser.

JWT Generator

If header uses alg=none, signature will be empty. For HMAC algorithms, provide a secret.

Frequently Asked Questions

What signing algorithms are supported?

This tool generates JWTs signed with HMAC-SHA256 (HS256).

Is my secret uploaded?

No. Token generation is performed client-side in your browser using the Web Crypto API.

Can I customise the header and payload?

Yes. You can edit the JSON header and payload freely before signing.

Example input/output

Input: Header: {"alg":"HS256","typ":"JWT"} / Payload: {"sub":"1234","name":"Ada"} / Secret: mysecret

Output: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0IiwibmFtZSI6IkFkYSJ9.[signature]

How it works

This tool Base64url-encodes the header and payload JSON, concatenates them with a dot, then signs the result using HMAC-SHA256 with the Web Crypto API. The resulting signature is Base64url-encoded and appended to form the final JWT. Processing runs in your browser.

Common use cases

Related tools