Security

How to Generate a JWT Token

Step-by-step guide to creating a signed JSON Web Token using the DevHexLab JWT Generator.

Tool Used

JWT Generator

Open tool
1

Open the JWT Generator

Navigate to /tools/security/jwt-generator.

2

Set the header algorithm

Choose the signing algorithm from the dropdown. HS256 (HMAC with SHA-256) is the most common choice for symmetric key signing.

3

Fill in the payload

Enter the claims as JSON. Common claims include sub (subject / user ID), iat (issued at), exp (expiry as a Unix timestamp), and any custom claims your application needs.

4

Enter the secret and sign

Paste your secret key into the secret field and click Generate. Copy the resulting token to use in Authorization headers or testing.

All done!

You are ready to use JWT Generator like a pro.

Try it now
All guides