Skip to main content
ToolsHub

JWT Generator (HS256/384/512)

Build standard claims, add custom JSON claims, sign JWTs with WebCrypto HMAC algorithms, and verify tokens immediately without sending secrets off-device.

Updated

Files never leave your browser

Security note: never paste production secrets. Signing and verification run entirely in your browser.

JWT Generator (HS256 / HS384 / HS512)

No token generated yet

Fill in the claims and signing secret, then generate to see the signed JWT here.

How to use JWT Generator (HS256/384/512)

JWT Generator (HS256/384/512) creates signed JSON Web Tokens in your browser using WebCrypto HMAC, then immediately verifies the generated token with the same secret for round-trip confidence. The tool includes standard claim inputs, expiration presets, optional iat auto-fill, custom JSON claim merging, optional base64-secret decoding, and a second verification tab for pasted tokens. It is designed as a practical counterpart to the JWT decoder so you can build, inspect, and validate symmetric JWT flows end-to-end without external dependencies or server uploads.

  1. Choose HS256, HS384, or HS512 and optionally set a kid value in the JWT header builder.
  2. Fill standard claims (iss, sub, aud), pick an exp preset, and decide whether iat should auto-fill now.
  3. Add extra claims in JSON form and enter your signing secret (optionally marked as base64 encoded).
  4. Generate the token, copy header.payload.signature output, and review decoded header/payload previews.
  5. Use the Verify tab to validate any HS token with a secret and inspect exp status immediately.

Your data never leaves your device — 100% private processing.

HS vs RS JWT signing models and trust boundaries

HMAC-based JWT algorithms (HS256/384/512) use a single shared secret for both signing and verification, which is simple and fast but requires every verifier to protect the same key material. Asymmetric algorithms such as RS256 separate responsibilities: a private key signs while a public key verifies, allowing many services to validate tokens without being able to mint them. This distinction matters for architecture and incident response. HS works well for tightly controlled systems, while RS/EdDSA are safer when validation happens across multiple independent services or partners where secret sharing would be risky.

Secret handling and operational safety for JWT tooling

Even in browser-only tools, secret hygiene is critical. Use temporary test secrets, rotate frequently, and avoid reusing production credentials in ad hoc debugging sessions. Base64-secret mode exists because some platforms store binary HMAC keys as encoded strings; decoding before signing ensures interoperability with backend validators. Also remember JWT payloads are readable by design, so avoid placing confidential data in claims and rely on short expirations plus issuer/audience checks. This generator keeps processing local, but operational discipline still determines whether your token workflows stay secure over time.

Worked examples

Generate a 1-hour token

Inputs: HS256, sub=123, exp preset 1h, secret test-secret

Result: Signed JWT + round-trip valid indicator + decoded payload preview

Verify an existing token

Inputs: Paste token + secret in Verify tab

Result: Shows valid/invalid signature and exp status active/expired/not yet valid

Glossary

HMAC
A symmetric message authentication method used by HS* JWT algorithms for signing and verification.
NumericDate
JWT timestamp format representing seconds since Unix epoch, used by exp, nbf, and iat claims.
base64url
URL-safe Base64 variant using - and _ with optional removed padding, used by JWT segments.
Round-trip verification
Immediate re-validation of a newly signed token with the same secret to confirm signature integrity.
kid
Header key identifier hint that helps verifiers choose the correct signing key.

Related reading

Free · No spam

Get weekly tool tips & updates

New tools, power-user tips, and productivity hacks — delivered free every Friday.

No spam, ever. Unsubscribe with one click.

Related Developer Tools

Explore all Developer Tools.