🎫

JWT Generator (HS256/384/512)

Software · 3 inputs · Free

🎫

JWT Generator (HS256/384/512)

3 inputs

Parameters

What is this tool?

JWT Generator (HS256/384/512) helps developers with encoding, encryption and text processing. Signs a JSON payload with your secret and builds a JWT (RFC 7519) using HS256, HS384 or HS512. The token is created in your browser and the secret is never sent anywhere; even so, it is safest not to paste production secrets into online tools.

📘 Common mistakes · Worked example
Payload (JSON)SecretAlgorithm

Signs a JSON payload with your secret and builds a JWT (RFC 7519) using HS256, HS384 or HS512. The token is created in your browser and the secret is never sent anywhere; even so, it is safest not to paste production secrets into online tools.

The result is not exact or binding and is for information only; it is not an official document and cannot be used in official procedures. Confirm it with the competent authority or a professional before acting; no liability is accepted for losses arising from its use.

Last reviewed: · Methodology and sources

How is it calculated?

Signs a JSON payload with your secret and builds a JWT (RFC 7519) using HS256, HS384 or HS512. The token is created in your browser and the secret is never sent anywhere; even so, it is safest not to paste production secrets into online tools.

Inputs

ValueUnitExample
Payload (JSON)—{"sub":"1234567890","name":"John Doe","iat":1516239022}
Secret—your-256-bit-secret
Algorithm—HS256 (HMAC-SHA-256)

What is this tool?

JWT Generator (HS256/384/512) helps developers with encoding, encryption and text processing. Signs a JSON payload with your secret and builds a JWT (RFC 7519) using HS256, HS384 or HS512. The token is created in your browser and the secret is never sent anywhere; even so, it is safest not to paste production secrets into online tools.

Common mistakes

  • Putting secrets in the payload. The payload is encoded, not encrypted, and anyone can read it.
  • Using a short or guessable secret. An attacker with a single token can brute-force the key offline; RFC 8725 says human-memorable passwords must not be used directly as HMAC keys.
  • Writing exp and iat in milliseconds. JWT time claims count seconds since 1970; in JavaScript, divide Date.now() by 1000 and round down.
  • Leaving out exp. A token without an expiry stays valid after a leak until the key is rotated; give access tokens a short lifetime.
  • Trusting the alg header on the server. The verifier must pin the algorithms it accepts, otherwise alg: none or algorithm-confusion attacks become possible.
  • Expecting a Base64 secret to be decoded. Some libraries Base64-decode the secret before use; this tool takes the text literally, so signatures may not match such a library.
  • Writing large numeric IDs as numbers. Integers above 2⁵³ lose precision when JSON is parsed; put long identifiers in quotes as strings.

📘 How to Create a JWT: Signing with HS256 Step by Step →

Sources

Key terms

Payload (JSON)SecretAlgorithm

Frequently Asked Questions

+JWT Generator (HS256/384/512) — how is it calculated?

Signs a JSON payload with your secret and builds a JWT (RFC 7519) using HS256, HS384 or HS512. The token is created in your browser and the secret is never sent anywhere; even so, it is safest not to paste production secrets into online tools.

+Which values are required?

Payload (JSON), Secret, Algorithm.

+Is my data stored?

No. All calculations run in your browser; the values you enter are never sent to or stored on a server. If you press “Save”, the calculation stays only in your own browser and you can delete it at any time.

+Is it free?

Yes, all tools are free and require no sign-up.

Similar tools

Popular Tools

🧮

Free Calculators in One Place

Tax, finance, health, math and more — 500+ tools, all in one place.

Choose your cookie preference to continue

Records the site needs to work (theme, language, favourites) stay in your browser.

This site is free and funded by ads.

With your consent, Google Analytics cookies measure visits and Google AdSense cookies are used to show ads; the data is processed on Google servers abroad.

If you reject, the site works just the same.

Cookie Policy · KVKK notice