Web Developer Tools

JWT Generator

Create, configure, and sign JSON Web Tokens with custom headers, registered claims, and cryptographic signing keys. 100% private in-browser generation.

Signing & Token Configuration
Error message will appear here.
Quick Claims Helper — Click to inject standard RFC 7519 claims into the payload
Current Epoch: --
Header alg / typ
Valid JSON
Token Type: JWT 0 bytes
Payload Data / Claims
Valid JSON
8 claims 0 bytes
HMAC Secret Key (256-bit recommended)
For symmetric algorithms (HS256/384/512), both token issuer and verifier must share this secret. 100% evaluated client-side.
Requires an unencrypted PKCS#8 PEM private key. Verification uses the matching public key. Never paste production credentials here!
Warning: Unsigned Token Mode Selected (alg: none). Unsigned tokens have no cryptographic signature and must NEVER be used for production authentication or authorization.
Generated Token
HS256
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIn0.4Sdf_example_signature...
Single-line URL-safe Compact JWS Token 0 characters
Claim Standard Name Decoded Value / Meaning
Decoded Header

                            
Decoded Payload

                            
Total Size: 0 B
Header: 0 B
Payload: 0 B
Signature: 0 B
100% Client-Side Web Crypto API
Security Best Practices for JSON Web Tokens

JWT payloads are Base64URL-encoded, not encrypted. Any client or intermediate proxy can decode the payload and view the claims. Never store sensitive credentials, plaintext passwords, credit cards, or internal infrastructure secrets in token payloads. Tokens generated with test keys or shared secrets must never be used in production environments.

How to Use the Online JWT Generator

Follow these simple steps to construct, customize, and sign standard JSON Web Tokens directly in your web browser:

1
Choose an Algorithm

Select your signing algorithm from the dropdown: HMAC (HS256, HS384, HS512) for symmetric secrets or RS256 for RSA private keys.

2
Configure the Header

Verify the token header JSON. The alg attribute synchronizes automatically with your chosen algorithm.

3
Define Payload Claims

Enter your user identifiers, roles, permissions, and custom metadata in standard JSON format.

4
Set Expiration Helpers

Use the Quick Claims Helper toolbar to inject standard timestamps (iat, nbf) and presets (+15m, +1h, +24h, +7d).

5
Supply the Signing Key

Provide your HMAC secret passphrase or RSA PKCS#8 PEM private key. Use the reveal toggle or random generator as needed.

6
Generate & Copy Token

Click Generate JWT to compute the signature. Copy the compact token or inspect decoded claims in one click.

RFC 7519 Standard Registered Claims Reference

The Internet Engineering Task Force (IETF) defines seven standard registered claims in RFC 7519 to promote interoperability across authentication systems:

Claim Key Full Name Purpose & Description Example Value
iss Issuer Identifies the principal that issued the JWT (e.g. an authorization server URL). "https://auth.example.com"
sub Subject Identifies the principal that is the subject of the JWT (e.g. user ID or account UUID). "usr_9981245"
aud Audience Identifies the recipients that the JWT is intended for (e.g. target API resource URI). "https://api.example.com"
exp Expiration Time NumericDate timestamp (seconds since Unix epoch) after which the token must be rejected. 1730086400
nbf Not Before NumericDate timestamp (seconds since Unix epoch) before which the token must NOT be accepted. 1730000000
iat Issued At NumericDate timestamp recording when the JWT was created by the authorization server. 1730000000
jti JWT ID Unique identifier for the token, commonly used to prevent replay attacks and track revocations. "c8f0f35a-94a2-4a0b-95eb"

Signing Algorithm Comparison (HS256 vs. RS256)

Choosing the right cryptographic signing algorithm depends on your architecture, key management capabilities, and trust boundaries:

Feature HS256 / HS384 / HS512 RS256 (RSASSA-PKCS1-v1_5)
Cryptographic Family Symmetric HMAC (Hash-based Message Authentication Code) Asymmetric RSA Signature with SHA-256
Key Structure Single shared secret passphrase (e.g. 256-bit string) Public / Private Key Pair (PKCS#8 PEM private key)
Signing Requirement Requires shared secret Requires Private Key only
Verification Requirement Requires the same shared secret Requires Public Key (can be distributed freely via JWKS)
Best Use Case Single monolithic backend, private microservices where secret can be safely shared OAuth 2.0 / OpenID Connect, multi-tenant architectures, public client APIs
Execution Speed Extremely fast, minimal CPU overhead Moderate, asymmetric cryptographic operations take more CPU cycles

Frequently Asked Questions

What is a JWT Generator?
A JWT Generator is an interactive developer tool that enables you to configure a JSON header, build a payload with registered and custom claims, provide a cryptographic key, and generate a standard compact JSON Web Token (base64url(header).base64url(payload).base64url(signature)) for development and testing.
What is a JSON Web Token?
A JSON Web Token (JWT, RFC 7519) is an open, industry-standard method for securely representing claims between two parties. It is widely used for stateless authentication and authorization in web applications, mobile apps, microservices, and single-page applications.
How is a JWT structured?
A standard compact JWT consists of three Base64URL-encoded segments separated by periods: the Header (specifying token type and signing algorithm), the Payload (containing claims like issuer, subject, permissions, and expiration), and the Signature (cryptographic hash ensuring token integrity).
What is the difference between HS256 and RS256?
HS256 is a symmetric algorithm using a single shared secret key for both signing and verifying the token. RS256 is an asymmetric algorithm that signs tokens using a private RSA key and verifies them using a paired public key, allowing distributed verification across APIs without exposing the signing credential.
What are registered JWT claims?
Registered claims are standard claim keys defined in RFC 7519: iss (issuer), sub (subject), aud (audience), exp (expiration time), nbf (not-before time), iat (issued-at time), and jti (JWT ID). While optional according to the RFC, they provide standard interoperability across identity providers.
How do expiration and not-before claims work?
The exp claim specifies the Unix epoch timestamp in seconds after which the token must be rejected. The nbf claim specifies the timestamp before which the token is not yet valid. The receiving application must validate these timestamps against its current clock during token verification.
Is a JWT encrypted?
No. Standard JWS tokens are signed and Base64URL-encoded, not encrypted. Anyone who intercepts the token can decode and view the header and payload claims. Never store confidential information like passwords or private API keys in an unencrypted JWT.
Does generating a JWT verify it?
No. Generating a token computes a cryptographic signature based on the provided key and payload. Recipient services must independently verify the signature against their trusted key and validate claims before granting access.
Can I generate a JWT without a secret key?
You can generate an unsigned token by selecting alg: none. However, unsigned tokens have an empty signature and must never be used in production environments because anyone can tamper with their contents without detection.
Is my signing key uploaded to a server?
No. PaceTools executes all HMAC and RSA cryptographic signing operations 100% locally in your web browser via the native Web Crypto API. Your secrets, private keys, and payload data are never sent over the network or saved.
Can I use generated tokens in production?
Tokens generated using sample keys or demo secrets must never be used in production. Tokens created for local development or testing with your own secure keys are valid JWTs, but production tokens should ideally be issued by an automated identity provider.
What is the difference between a JWT Generator and a JWT Decoder?
A JWT Generator creates new tokens by encoding headers and payloads and computing cryptographic signatures. A JWT Decoder inspects existing tokens by reversing the Base64URL encoding to reveal their contents, timestamps, and signature status.