JWT Generator

What is a JWT Generator?

Build, sign, and generate JSON Web Tokens (JWT) using HMAC SHA-256 (`HS256`), `HS384`, or `HS512` algorithms. Customize header tags, expiration timestamps (`exp`), issued-at (`iat`), sub, role claims, and secret signing keys.

Why Use This Tool?

  • REST API & OAuth Testing: Generate mock JWT authentication tokens for frontend testing and API endpoint debugging.
  • Custom Role Claim Inspection: Test custom claims (`role: admin`, `tenant_id`) in token payloads.
  • Local Private Key Signing: Sign JWT tokens locally without sharing secret keys with external online generators.

How to Use

  1. Edit Header JSON (default: `{"alg": "HS256", "typ": "JWT"}`).
  2. Edit Payload JSON (e.g. `{"sub": "123", "name": "Admin", "exp": 1770000000}`).
  3. Enter Secret Key and click Generate JWT Token.

Real Working Example

Input:

Payload: {"sub": "user_123", "role": "admin"} | Secret: "super_secret_key_2026" | Alg: HS256

Output Result:

Generated JWT Token:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c2VyXzEyMyIsInJvbGUiOiJhZG1pbiJ9.7x9Y2m...

Important Technical Details & Security Standards

  • RFC 7519 JWT Standard Compliance: Encodes header and payload as Base64URL strings joined by dots (`header.payload.signature`).
  • Web Crypto HMAC Signing: Computes `HMAC-SHA256(Base64URL(Header) + "." + Base64URL(Payload), Secret)` signature.
  • 100% Client-Side Engine: Secrets and tokens remain 100% private in browser memory.

Related Security & Crypto Tools

Frequently Asked Questions

What are the 3 parts of a JSON Web Token (JWT)?

A JWT consists of 3 parts separated by dots: Header (algorithm), Payload (claims), and Signature.

What is Base64URL encoding in JWT?

Base64URL replaces standard Base64 characters + and / with - and _ and omits trailing = padding to make tokens URL-safe.

Is my secret signing key sent to a server?

No, token signing occurs 100% locally inside your web browser.

Is it free?

Yes, 100% free.

What is the exp claim in a JWT payload?

The `exp` (expiration time) claim specifies the Unix epoch timestamp after which the token must not be accepted for processing.

What algorithms are supported for signing?

Supports HMAC algorithms HS256, HS384, and HS512.