What is a JWT generator?
A JWT generator creates JSON Web Tokens: compact, signed strings that carry claims about a user or client, widely used for API authentication and single sign-on. Developers need them to test protected endpoints, mock identity providers and debug token handling.
Edit the payload, use the buttons to set the issued-at time or an expiry from 15 minutes to 30 days, and add an optional key ID. Choose one of twelve algorithms with a shared secret or an RSA, ECDSA or Ed25519 key pair. The token is re-signed as you type and shown with its three parts coloured.
How to use the JWT generator
1.Write the payload
JSON claims such as sub, role and exp, with quick buttons for times.
2.Choose algorithm and key
A shared secret, or a generated or pasted private key.
3.Copy the token
And the public key for whoever verifies it.
Example: the classic test token
Payload {"sub": "1234567890", "name": "John Doe", "iat": 1516239022}, HS256, secret your-256-bit-secret:
- Header
- eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9
- Signature
- SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Exactly the token most JWT documentation uses, so you can confirm the signing is correct.
Standards-compliant signing
Tokens follow RFC 7515 and 7519 and are signed with your browser's WebCrypto. HS algorithms use a shared secret; RS and PS use RSA keys; ES uses elliptic curves P-256 and P-384; EdDSA uses Ed25519. Private keys must be PKCS#8 PEM, the format starting -----BEGIN PRIVATE KEY-----.
RFC 7518 asks for HMAC secrets at least as long as the hash, so 32 bytes for HS256; shorter secrets are flagged. Generated key pairs stay in this tab. Even so, use this for development and testing, and keep production signing keys in your own servers or a key vault.
Frequently asked questions
Can I check a token here?
Use the JWT decoder to read claims and verify an HMAC signature.
Is the payload secret?
No. JWTs are signed, not encrypted, so never put passwords or secrets in claims.
Why won't my private key load?
It may be in the older PKCS#1 format. Convert it with openssl pkcs8 -topk8 -nocrypt.
Does signing happen on a server?
No. Signing happens in your browser.
Related tools
JWT Decoder
Decode a JSON Web Token's header and payload and check its expiry.
Secret Key Generator
Random 128 to 512-bit keys as hex, Base64 and Base64URL.
SSH Key Generator
Ed25519, ECDSA and RSA key pairs in OpenSSH and PEM formats.
Base64 Encoder & Decoder
Base64 and Base64url for text (UTF-8) and files.
URL Encoder & Decoder
Percent-encode or decode URLs and query values, and see a URL's parts.
Hash Generator: MD5, SHA-1, SHA-256
MD5, SHA-1 and SHA-256 hashes of text or files, with checksum compare.
More Developer tools
JSON & data
CSV tools
Network & system
Web & API
Git & releases
Encoding & security
Text & code
- Regex tester
- Text diff checker
- Cron expression explainer
- Lorem ipsum generator
- Markdown previewer
- Slug generator
- Strip HTML tags
- Unicode character inspector
- URL parser
- Markdown TOC generator
- cURL converter
- Whitespace visualizer
- Markdown link extractor
- Regex escape
- Regex match extractor
- Split text by regex
- HTML, CSS and JS playground
- Mock data generator
- Keyboard event tester
- ASCII table