CalculatorsConvertersDeveloperTextAll toolsDirectory
Submit your tool Sign in
Theme
Home/Answers/Security
How-to

How do I create a signed HS256 JWT for testing?

Short answer

Use a browser-based JWT generator to build a token from your payload and sign it with a secret using HS256. The signing runs on your device with the Web Crypto API, so your payload and secret are never uploaded.

What HS256 signing does

HS256 signs a JWT with a keyed SHA-256 hash using a shared secret, producing the signature part of the token. Anyone holding the same secret can verify it. This symmetric approach is common for internal services and for generating test tokens where you control both sides. You provide the claims you want in the payload and a secret, and the tool assembles the signed token.

Build test tokens without a server

A client-side JWT generator lets you craft a token for local testing entirely in your browser, so the payload and secret stay on your machine. That is handy for exercising an endpoint that expects a valid token during development. It is free and needs no account.

Step by step

  1. Open the generator. Open the JWT generator in your browser.
  2. Enter payload and secret. Fill in the claims you want and the signing secret.
  3. Generate the token. Generate the HS256-signed JWT and copy it for your test.

Frequently asked questions

What algorithm does it use?

It signs the token with HS256, a keyed SHA-256 signature using your secret.

Is my secret uploaded?

No. Signing happens in your browser with the Web Crypto API, so nothing is sent to a server.

Can others verify the token?

Yes. Anyone with the same secret can verify an HS256-signed token.

Related answers