jsonecho

JWT Generator

Write a payload, enter a secret and get a signed JSON Web Token.

Loading the tool...

How to use JWT Generator

  1. Write the payload as a JSON object.
  2. Choose the algorithm, enter a secret and set an expiry if you need one.
  3. Copy the token. Paste it into the JWT Decoder to check it.

About JWT Generator

A JSON Web Token is a signed string that carries claims, such as who a user is and when the token expires. This tool builds one for you: write the claims as JSON, choose an algorithm, enter a secret, and the token is signed with HMAC right in your browser.

It is meant for testing, learning and development. Do not paste the secret of a live production system into any website. Tokens signed here use symmetric algorithms, so whoever knows the secret can create valid tokens.

Frequently asked questions

Is my secret sent anywhere?

No. The token is signed in your browser with the Web Crypto API. Nothing is uploaded.

Which algorithms are supported?

HS256, HS384 and HS512, which sign with a shared secret. Algorithms with a key pair, such as RS256 and ES256, are not offered here.

What do exp and iat mean?

exp is the time the token stops being valid and iat is the time it was issued. Both are Unix timestamps in seconds, and this tool fills them in when you ask.

How long should the secret be?

At least as long as the hash: 32 characters for HS256, 48 for HS384 and 64 for HS512. Use the Random Key Generator to create one.

More in URL and Base64

All tools →