Developer Tools
JWT Generator
Enter a header and payload, pick HS256/384/512 (HMAC secret) or RS256/384/512 (RSA private key), and get a signed JSON Web Token instantly. Generate an RSA key pair in-tool for asymmetric signing. Great for testing auth flows, mocking APIs, and verifying signatures — runs entirely in your browser with Web Crypto.
What makes this tool different
HMAC and RSA signing
Sign tokens with HS256/384/512 using an HMAC secret, or RS256/384/512 using an RSA private key — the two most common JWT algorithms.
Web Crypto signing
Signatures are produced by the browser's crypto.subtle — no dependencies and no network calls.
Generate RSA keys in-tool
No key handy? Generate a 2048-bit RSA key pair in the browser and sign with it immediately — the public key is shown for verification.
Keys stay local
Your secret or private key is used only in-browser to sign and is never uploaded or stored.
Live token preview
The signed JWT updates as you edit, so you can test against a known value immediately.
About this tool
JWT Generator: everything you need to know
JSON Web Tokens are the default way to carry identity and claims between services. When you build or test an auth flow, you constantly need a freshly signed token — to mock an API, to reproduce a bug, or to confirm a verifier behaves.
OpenToolLab's JWT generator signs tokens with the HMAC family (HS256, HS384, HS512) using the browser's Web Crypto API. You supply a header and payload as JSON plus your secret, and it returns a complete token in header.payload.signature form.
Because signing happens in your browser, your secret key never leaves your device and there is no server in the loop. That makes it safe for development and testing — though, as with any online tool, you should avoid pasting production secrets.
Pair it with the JWT decoder on the same site: generate a token here, then paste it there to confirm the claims and signature are exactly what your backend will see.
FAQ
JWT Generator — frequently asked questions
How do I generate a JWT token online?
Enter your header and payload as JSON, choose an algorithm, add a secret or key, and the tool returns a signed token in header.payload.signature format. OpenToolLab's JSON web token generator runs entirely in your browser — nothing is uploaded.
How do I generate a JWT with RS256 (asymmetric)?
Choose RS256, RS384, or RS512, then paste a PKCS#8 private key (BEGIN PRIVATE KEY) or click Generate pair to create an RSA key pair in your browser. The tool signs with RSASSA-PKCS1-v1_5 and shows the public key for verification.
How do I generate a random JWT secret key online?
In HMAC mode, click Generate secret to create a cryptographically random secret, or type your own. This covers jwt secret generator, jwt secret key generator, and random jwt secret generator needs without installing anything.
How do I generate a JWT public/private key pair online?
Switch to RS256/384/512 and click Generate pair. The tool creates an RSA public and private key pair in your browser, signs the token with the private key, and displays the public key — a built-in jwt public private key generator.
How do I sign a JWT online (online JWT signature generator)?
The tool signs header.payload with HMAC (HS*) or RSA (RS*) via Web Crypto and appends the signature as the third segment. It works as an online JWT signature generator and JWT sign tool with live updates.
How do I edit a JWT token?
Edit the header or payload JSON and the token re-signs live; change the algorithm with the selector. This makes it easy to edit a JWT token, tweak claims, and regenerate the signature immediately.
How do I generate a JWT from the command line?
On the CLI you would use a library such as Node's jsonwebtoken: jwt.sign(payload, secret, { algorithm: 'HS256' }). This online generator produces the identical token with no install — handy for quick tests and mock auth.
Is this JWT encoder safe for my secret?
Your secret or private key is used only in-browser to sign and is never transmitted or logged. Still, do not paste production secrets into any web tool — use this JWT encoder for development and testing.
Keep exploring