T
DataToolings

JWT Generator

Generate and sign JSON Web Tokens (JWT) with HS256, HS384, or HS512. Set custom payload claims and secret key. Runs entirely in your browser.

Related Developer Tools

What Is a JWT Generator?

A JWT (JSON Web Token) generator creates digitally signed tokens that securely transmit information between parties. JWTs consist of three Base64URL-encoded parts — header, payload, and signature — joined by dots. This tool generates HMAC-signed JWTs (HS256, HS384, HS512) entirely in your browser using the Web Crypto API.

How to Use

  1. Edit the JSON payload with your claims (sub, name, exp, etc.).
  2. Enter your secret key used to sign the token.
  3. Select an HMAC algorithm: HS256, HS384, or HS512.
  4. Click Generate Token to create the signed JWT.
  5. Copy the token for use in your application or API testing.

Features

  • Supports HS256, HS384, and HS512 HMAC signing algorithms.
  • Color-coded token parts: header (red), payload (purple), signature (cyan).
  • Uses the Web Crypto API — no external libraries, runs in browser.
  • JSON payload validation with clear error messages.
  • No data is sent to any server — fully private and secure.

FAQ

What is the difference between HS256, HS384, and HS512?

All three use HMAC with a shared secret, differing only in hash length: SHA-256 (32 bytes), SHA-384 (48 bytes), SHA-512 (64 bytes). HS256 is the most common choice for most applications. Use HS512 when maximum signature strength is required.

What standard claims should I include?

Common claims include: sub (subject),iat (issued at, Unix timestamp),exp (expiry, Unix timestamp),iss (issuer), andaud (audience).

Is this safe to use with real secrets?

All signing happens locally in your browser using the Web Crypto API. No data is sent to any server. That said, avoid using real production secrets in any browser-based tool as a best practice.