JWT Generator
Create signed JSON Web Tokens online with HS256, HS384 or HS512 from a custom header and payload. Signing happens in your browser; the secret stays local.
Runs in your browser · Nothing uploadedFree · No sign-up
Something not working, or missing a feature? Send feedback
About the JWT Generator
The JWT Generator is an online JWT token generator for testing APIs and authentication flows. Edit the header and payload as JSON, choose an HMAC algorithm and sign with your own secret.
Everything runs in your browser, so your input is never uploaded to a server.
How to use the JWT Generator
- Edit the payload claims (for example sub, exp, roles).
- Choose HS256, HS384 or HS512 and enter a secret.
- Copy the signed token into your request or test.
Common mistakes
- A short or guessable secret. HMAC tokens are only as strong as the secret. A word or short phrase can be brute-forced offline from a single token; use at least 32 random bytes for HS256.
- exp in milliseconds. exp, iat and nbf are seconds since 1970, not milliseconds. A millisecond value puts the expiry tens of thousands of years in the future.
- Secrets in the payload. The payload is only Base64URL-encoded, not encrypted. Anyone with the token can read it, so never put passwords or personal data in claims.
Works well with the JWT Generator
- JWT Decoder & Verifier: decode a token and check its claims and expiry.
- Random String Generator: generate a strong signing secret.
- Unix Timestamp Converter: work out exp and iat values.
Frequently asked questions
How long should the secret be?
At least as long as the hash output: 32 random bytes for HS256, 48 for HS384 and 64 for HS512.
Can it create RS256 tokens?
No, it signs with shared-secret HMAC algorithms only.
Should I use tokens from this tool in production?
Use them for testing and development. Production tokens should be issued by your server, which keeps the secret out of any browser.
Is the secret sent anywhere?
No. Signing uses the Web Crypto API in your browser, so the secret never leaves your device.
Guides and tutorials
Related tools
Base64 Encode / Decode
Decode Base64 to text or encode text to Base64 online, with full UTF-8 and URL-safe Base64 support. Conversion runs in your browser, so nothing is uploaded.
URL Encode / Decode
URL encode or decode text online: percent-encode query string values and full URLs, or turn %20-style escapes back into readable text.
HTML Entity Encode / Decode
Encode special characters as HTML entities or decode entities such as & and < back to text. Escape user content safely before adding it to a page.
JWT Decoder & Verifier
Paste a JWT to decode its header and payload instantly, read exp and iat as dates and verify HS256 signatures. Tokens are decoded locally, never uploaded.
Unicode Escape / Unescape
Convert text to \uXXXX Unicode escape sequences and back online, including emoji and astral characters. Handy for JavaScript, JSON and Java strings.
JSON Escape / Unescape
Escape text for use inside a JSON string, or unescape stringified JSON back to readable text. Handles quotes, backslashes, line breaks and Unicode escapes.