← All text tools

JWT generator

Create and sign JSON Web Tokens (HS256, HS384, HS512) for testing, in your browser.

  • Free
  • No sign-up
  • Works on any device

About JWT generator

Create signed JSON Web Tokens with HS256, HS384 or HS512 for testing an API or login flow. Enter header and payload claims such as sub and exp, and a secret. Use test secrets only, never production keys, and note that exp is a Unix timestamp in seconds.

How to use JWT generator

  1. Edit the header and payload JSON.
  2. Choose HS256, HS384 or HS512 and enter a secret.
  3. Copy the signed token to use in your tests.

Why use this tool?

Also known as

Frequently asked questions

What does the exp claim in a JWT mean?

It is the expiry time as a Unix timestamp in seconds. After that moment a correct server should reject the token.

How long should the secret be?

Use a long random string, at least as long as the hash output. Short or guessable secrets are easy to crack, even for test tokens.

How do I make a token that is already expired?

Set the exp claim to a time in the past in Unix seconds. This is handy for testing how your app reacts to expired tokens.

Is JWT generator free?

Yes. JWT generator on Toolipedia is free to use, with no sign-up and no watermark.

Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.

Can I put JWT generator on my own website?

Yes. Use the Embed on your site button under the tool to copy a short piece of code and paste it into your page. It is free, needs no account, and the tool keeps working inside your page.

Related tools