{ JWT Generator }

// generate signed JWT tokens from a visual claim editor

Generate signed JWT tokens from a visual claim editor. Configure header algorithm, add standard and custom claims, sign with HMAC or RSA keys — browser-based, free, no signup.

// ALGORITHM
// PAYLOAD CLAIMS
// HMAC SECRET
// GENERATED TOKEN
🔐

Token will appear here

Configure claims and signing key on the left

HOW TO USE

  1. 01
    Choose algorithm

    Select HS256/384/512 for HMAC with a shared secret, or RS256/384/512 for RSA with a private key. The key input section updates accordingly.

  2. 02
    Build the payload

    Click quick-add buttons to add standard claims like sub, exp, and iss. Add custom claims as string, number, boolean, or JSON values.

  3. 03
    Sign and copy

    Enter your secret or private key, then click "🔐 Generate Token". Copy the full token or individual parts (header, payload, signature).

FEATURES

HS256 / HS384 / HS512 RS256 / RS384 / RS512 Standard Claims Custom Claims Expiry Presets Color-coded Parts Copy by Part Free & No Signup

USE CASES

  • 🔧 Generate test tokens for API development and debugging
  • 🔧 Create tokens for unit test fixtures and mocking
  • 🔧 Test JWT parsing and validation logic
  • 🔧 Prototype authentication flows before backend is ready

WHAT IS THIS?

The JWT Generator creates signed JSON Web Tokens from a visual editor without writing code. Configure the header algorithm, build the payload with standard and custom claims, provide a signing key, and click Generate. All cryptographic operations use the browser's native Web Crypto API — your keys and tokens never leave your machine.

RELATED TOOLS

FREQUENTLY ASKED QUESTIONS

Is it safe to use my real signing key here?

All processing happens entirely in your browser using the Web Crypto API — your key never leaves your machine and is not sent to any server. That said, as a general security principle, avoid using production signing keys in any third-party tool. Use a test key for development purposes, and keep production keys in a secrets manager.

What is the difference between HS256 and RS256?

HS256 uses a shared HMAC secret — both the issuer and the verifier need to know the same secret key. RS256 uses an RSA key pair — the issuer signs with the private key and any verifier can check the signature using only the public key. RS256 is better for distributed systems where multiple services need to verify tokens without knowing the signing secret.

How do I set the token expiry?

Click the "exp" quick-add button to add an expiration claim. It will be pre-populated with "now + 1 hour". You can change the value — enter a Unix timestamp directly, or use the offset presets like "1h", "24h", "7d". The tool automatically converts these to the correct Unix timestamp for the exp claim.

What claim types are supported?

Custom claims can be typed as: string (default), number (integer or float — useful for timestamps and IDs), boolean (true/false — useful for flags like admin: true), and JSON (for nested objects or arrays — parsed from the value field).

Can I use this with the JWT Decoder?

Yes. Generate a token here, copy it, then paste it into the JWT Decoder tool to inspect and verify it. The Decoder supports HMAC signature verification with the same secret you used here, so you can validate that the token roundtrips correctly.

Where do I get an RSA private key for RS256?

For testing, click the "⟳ Generate" button next to the key field — this generates a fresh RSA-2048 key pair in your browser using the Web Crypto API and populates the private key field. For production, use a proper key management system to generate and store RSA keys securely.

JWT Generator — Create and Sign JSON Web Tokens in the Browser

Generating JWT tokens manually during development is tedious — it requires either writing code to sign with the correct algorithm and key, or using a library CLI. This tool provides a visual interface for the same operation, backed by the browser's native Web Crypto API for cryptographically correct signatures.

When to Use JWT Tokens

JWTs are most commonly used for stateless authentication (API access tokens), information exchange between services, and OAuth 2.0 access tokens. The token contains all the information a service needs to authenticate a user without a database lookup — the claims in the payload, verified by the signature. This makes them ideal for microservice architectures where multiple services need to verify user identity independently.

Choosing the Right Algorithm

HS256 (HMAC-SHA256) is the simplest choice for single-application or internal APIs where both the issuer and verifier share a secret. RS256 (RSA-SHA256) is the better choice for public-facing APIs or multi-service architectures — the public key can be distributed widely while the private key stays secret. ES256 (ECDSA-SHA256) offers similar security to RS256 with shorter signatures and faster verification, though it requires a different key format.