JWT Generator
Build a signed JWT from your own header and payload. Sign with HS256, HS384 or HS512 and a secret, or RS256, RS384, RS512 or ES256 and a private key.
How to create a JWT
Paste your payload as JSON
Paste or type it into the box, or press Try an example.
Pick the algorithm and key
A secret for HS256, HS384 and HS512, or a private key for RS256 and ES256.
Copy or download
Copy the signed token.
Worked example
This is what JWT Generator gives for its own sample values. Open the tool above and change anything to try your own.
Payload (JSON)
{
"sub": "1234567890",
"name": "Ada Lovelace",
"admin": true
}- Algorithm
- HS256
- Secret
- your-256-bit-secret
- Extra header fields (JSON, optional)
- Add iat (issued at) with the current time
- No
- Expires in (minutes, 0 for never)
- 0
JWT
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkFkYSBMb3ZlbGFjZSIsImFkbWluIjp0cnVlfQ.vCshX8R0-FgTgKM_ThUPWV5mUG-D92UPJ0tGofq7wOs
About JWT Generator
Build a signed JSON Web Token from your own payload. You can add issued-at and expiry times, extra header fields such as kid, and sign with a shared secret or a private key. Handy for testing APIs.
FAQs
Is it safe to paste a real secret here?
Signing happens in your browser and nothing is sent, but use test keys where you can.
What is the difference between HS256 and RS256?
HS256 uses one shared secret. RS256 signs with a private key and anyone with the public key can verify.
How do I check a token?
Use JWT Verifier, or JWT Decoder to read it without a key.