JWT Generator — Sign a JWT with HS256, RS256 or ES256
🔒 Runs in your browser — nothing is sent to a serverJWT generator that produces a signed JSON Web Token from a JSON payload, a key and an algorithm in a single click. Fill in the claims you need — `sub`, `iat`, `exp`, custom fields — pick HS256/HS384/HS512 for symmetric HMAC signing or RS256/ES256 for asymmetric signing with an RSA or EC key. For asymmetric algorithms the generator can mint a fresh key pair in-browser and hand you the matching public key for your verifier. Everything runs 100% inside your browser through the Web Crypto API; your secret, private key and payload never leave your device.
When to use a JWT generator
A JWT generator is the fastest way to mint a token for local work — reproducing a failing request in a test harness, seeding a fixture for an integration test, stubbing an authenticated request against a staging API, teaching a workshop on bearer-token auth, or simply verifying that a downstream service rejects an expired token. For production traffic the signing should happen inside your auth service; for every other case, a browser-local generator that never touches the network is ideal because your secret stays on your machine.
How JWT signing works under the hood
Signing a JWT is three operations in sequence. First the header (for example `{"alg":"RS256","typ":"JWT"}`) is JSON-stringified and base64url-encoded. Second the payload is JSON-stringified and base64url-encoded. Third the string `headerB64.payloadB64` is fed into the signing primitive: HMAC-SHA-256/384/512 for HS*, RSASSA-PKCS1-v1_5 with SHA-256 for RS256, or ECDSA on P-256 with SHA-256 for ES256. The Web Crypto API implements all three natively through `crypto.subtle.sign`, and `crypto.subtle.generateKey` mints fresh RSA-2048 or P-256 key pairs without bundling a crypto library. Your secret or private key goes straight into the browser crypto primitive and never leaves the tab.
Examples
{
"sub": "1234567890",
"name": "John Doe",
"iat": 1516239022
}
secret: your-256-bit-secreteyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c{
"iss": "https://auth.free-converter.online",
"aud": "api.kwezitgames.com",
"sub": "user_42",
"exp": 1750000000,
"iat": 1749996400
}
secret: hmac-secret-for-testingeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2F1dGguZnJlZS1jb252ZXJ0ZXIub25saW5lIiwiYXVkIjoiYXBpLmt3ZXppdGdhbWVzLmNvbSIsInN1YiI6InVzZXJfNDIiLCJleHAiOjE3NTAwMDAwMDAsImlhdCI6MTc0OTk5NjQwMH0.<signature>{
"sub": "admin@free-converter.online",
"roles": ["admin", "auditor"],
"scope": "read write"
}
private key: -----BEGIN PRIVATE KEY----- (RSA-2048, PKCS#8)eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhZG1pbkBmcmVlLWNvbnZlcnRlci5vbmxpbmUiLCJyb2xlcyI6WyJhZG1pbiIsImF1ZGl0b3IiXSwic2NvcGUiOiJyZWFkIHdyaXRlIn0.<rsa-signature>{
"sub": "admin@kwezitgames.com",
"roles": ["admin"]
}
private key: -----BEGIN PRIVATE KEY----- (P-256, PKCS#8)eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhZG1pbkBrd2V6aXRnYW1lcy5jb20iLCJyb2xlcyI6WyJhZG1pbiJdfQ.<ecdsa-r-s-signature>