Free JWT Generator Online
Create and sign JSON Web Tokens for authentication. Free, fast, and works entirely in your browser with no sign-up required.
Updated
JWT Generator
Generate and verify JSON Web Tokens (JWT) with real cryptographic signatures. Supports HMAC and RSA algorithms.
JWT Generator
HMAC symmetric (shared secret)
Frequently Asked Questions
What is the JWT Generator?
The JWT Generator is a free online tool that creates and signs JSON Web Tokens for authentication testing and development purposes.
Is the JWT Generator free and secure?
Yes, it is completely free with no registration required. All token generation happens client-side in your browser, and your secret key is never transmitted.
What signing algorithms are supported?
The JWT Generator supports HS256, HS384, HS512, and other common signing algorithms used in JWT authentication.
Is my data safe with this tool?
Absolutely. The JWT Generator processes everything client-side in your browser. No data is uploaded to or stored on any server. Your content remains private on your device at all times.
Does the JWT Generator work on mobile devices?
Yes, the JWT Generator is fully responsive and works on smartphones and tablets. You can use it on any device with a modern web browser -- no app download required.
Do I need to create an account to use this tool?
No account or registration is needed. Simply open the JWT Generator in your browser and start using it immediately. There are no sign-up walls or usage restrictions.
How do I use the JWT Generator?
Simply enter your input in the provided field, adjust any settings to your preference, and the tool will process it instantly. You can then copy the result to your clipboard or download it.
Which browsers are supported?
The JWT Generator works in all modern browsers including Chrome, Firefox, Safari, Edge, and Opera. For the best experience, use the latest version of your preferred browser.
What is the difference between HS256 and RS256 JWT signing?
Both produce a SHA-based signature, but the key model is completely different. HS256 (and HS384/HS512) is HMAC: a single shared secret signs the token and verifies it, so every party that checks the signature could also forge one. RS256 (and RS384/RS512) is RSA-based and asymmetric: a private key signs the token while a separate public key verifies it, so you can hand the public key to many services without letting them mint tokens. As a rule, use HMAC when one trusted backend both issues and validates tokens, and use RSA when verifiers shouldn't hold the signing key, such as third parties or a public API. This generator signs with all six algorithms using the browser's Web Crypto API, and can produce a 2048-bit RSA key pair for you to test RS256 end to end.
Can anyone read the data inside a JWT?
Yes. A JWT is signed, not encrypted, so anyone holding the token can decode and read its payload. The header and payload are only Base64URL-encoded — not ciphered — and any decoder, including this one, reverses that instantly without a key. The signature only guarantees the token hasn't been altered since it was issued; it does not hide the contents. That means you should never place passwords, API secrets, or sensitive personal data in JWT claims. Treat the payload as public information that just happens to be tamper-evident. If you genuinely need the contents hidden, you need an encrypted token (JWE), which is a separate mechanism. Paste any token into this tool's decoder to see exactly what a recipient would read and confirm nothing sensitive is exposed.
What do the iat, exp, and nbf claims mean in a JWT?
These are registered time claims stored as Unix timestamps in seconds. The iat (issued-at) claim records when the token was created. The exp (expiration) claim sets when it stops being valid — verifiers reject the token once the current time passes exp. The nbf (not-before) claim is the opposite: the token is invalid until the current time reaches nbf, which is useful for tokens that should activate later. Keeping exp windows short limits the damage if a token leaks, since refresh tokens handle longer sessions. This generator fills iat and exp automatically with one-click presets of 15m, 1h, 24h, 7d, 30d, and 1y, and lets you toggle an nbf claim on. When you decode a token here, it also tells you whether it has expired and how long until or since exp.
How do I verify a JWT signature is valid?
Verification recomputes the signature over the token's header and payload using the correct key and checks that it matches the signature attached to the token. For HMAC algorithms (HS256/384/512) you supply the same shared secret used to sign; for RSA algorithms (RS256/384/512) you supply the matching public key in PEM format. If the recomputed value matches, the token is authentic and untouched; if not, it was altered or signed with a different key. Verification alone isn't enough, though — production code should also check exp, nbf, iss, and aud before trusting a token. Paste a token into this tool's decoder, provide the secret or public key, and it verifies the signature cryptographically in your browser using Web Crypto, so the result reflects real validation rather than a guess.
Why does my JWT show as invalid even with the right payload?
A token can be perfectly well-formed yet still fail validation for reasons unrelated to its claims. The most common cause is a secret or key mismatch: even a trailing space, wrong character encoding, or a Base64 secret pasted as raw text changes the signature and makes verification fail. Another is the algorithm — verifying an RS256 token with an HMAC secret, or vice versa, will never match. Time claims also matter: an expired exp or a future nbf marks the token invalid even when the signature is correct. Finally, any edit to the header or payload after signing breaks the signature, since it's computed over both. Use this tool to decode the token, confirm the algorithm in the header, check the exp and nbf timestamps, and re-verify with the exact secret or public key to pinpoint which of these is the culprit.
Embed This Tool
Add a free, live version of this widget to your own website or blog post — it runs entirely in your visitors' browsers, with a credit link back to The Toolbox.
<iframe src="https://getthetoolbox.com/embed/security-tools-jwt-generator" title="Free JWT Generator Online — The Toolbox" width="100%" height="420" style="max-width:480px;border:1px solid #e2e8f0;border-radius:12px" loading="lazy"></iframe>
<p style="font-size:12px;margin:4px 0 0"><a href="https://getthetoolbox.com/security-tools/jwt-generator?utm_source=embed&utm_medium=widget" target="_blank" rel="noopener">Free JWT Generator Online</a> by The Toolbox</p>Related Tools
Free Hash Verifier Online
Verify file integrity by comparing hash checksums. Free, fast, and works entirely in your browser with no sign-up required.
Free Security Headers Analyzer
Check website security headers and get improvement suggestions. Free, fast, and works entirely in your browser with no sign-up required.
Free Encryption/Decryption Tool
Encrypt and decrypt text using AES, DES, and other algorithms. Free, fast, and works entirely in your browser with no sign-up required.
Free HMAC Generator Online
Generate HMAC signatures for API authentication using multiple hashing algorithms. Free, fast, and works entirely in your browser with no sign-up required.
About the JWT Generator
The JWT Generator is a free online tool for building, signing, and decoding JSON Web Tokens directly in your browser. You assemble a payload of claims, pick a signing algorithm, supply a secret or key, and the tool produces a complete, properly signed token you can drop straight into an Authorization: Bearer header for testing. It also works in reverse, decoding any token you paste so you can inspect what's inside and check whether the signature actually verifies.
It's built for backend and API developers, QA engineers, and anyone learning how token-based authentication works. Instead of pulling in a library and writing throwaway code just to mint a test token, you can generate one in seconds and move on.
How tokens are built and signed
A JSON Web Token has three Base64URL-encoded parts joined by dots: a header, a payload, and a signature. The header declares the algorithm and token type ({"alg":"HS256","typ":"JWT"}); the payload carries the claims; the signature is computed over the first two parts so the token can't be tampered with undetected.
This tool performs real cryptographic signing through the browser's Web Crypto API — not a fake or demo signature. It supports six algorithms:
- HS256, HS384, HS512 — HMAC with SHA-256/384/512, using a shared secret you provide as either a raw string or Base64 value.
- RS256, RS384, RS512 — RSA signatures using RSASSA-PKCS1-v1_5. The tool can generate a 2048-bit RSA key pair for you and exports the public and private keys in standard PEM format.
Working with claims
The generator includes fields for the registered and common claims: sub (subject), name, email, role, iss (issuer), aud (audience), iat (issued-at), and exp (expiration). You can optionally add an nbf ("not before") claim, and inject any additional fields through a custom-claims JSON box.
Expiry is set with one-click presets — 15m, 1h, 24h, 7d, 30d, and 1y — and timestamps are stored as Unix seconds, exactly as the JWT spec requires. Payload templates seed the form for common scenarios so you don't start from a blank page:
- User Auth — a typical end-user session token
- Admin — a role with a permissions array
- API Key — a client with OAuth-style scopes
- Service Account — a machine-to-machine identity
Decoding and verifying tokens
Paste an existing token into the decoder and the tool splits it into header, payload, and signature, pretty-prints the JSON, and tells you whether the token has expired and how long until (or since) exp. Supply the matching secret or public key and it will verify the signature cryptographically — HMAC comparison for HS algorithms, RSA verification for RS algorithms — confirming the token is authentic and untouched.
Privacy and practical use
Everything happens client-side. Your secret keys, private keys, and token payloads are processed entirely in your browser and never sent to a server — there's no sign-up, no upload, and nothing stored. That matters because a JWT secret is as sensitive as a password; pasting one into a tool that phones home would be a real risk. Once the page loads it keeps working offline.
A few things worth knowing while you work:
- JWTs are signed, not encrypted. Anyone holding a token can read the payload, so never put passwords or secrets in the claims.
- Keep tokens short-lived. Short
expwindows limit the damage if a token leaks; refresh tokens handle longer sessions. - Tokens belong in headers, not URLs. They can end up in logs and browser history.
Use this JWT Generator for development, debugging, and learning. For production authentication, always sign and verify tokens server-side with a maintained library and protect the signing key.