JWT Generator
Create an HS256-signed JWT from a JSON payload and testing secret locally.
This tool runs entirely in your browser. Your files are never uploaded to a server.
Creates an HS256 signature locally. Use short-lived secrets only for testing; do not paste production credentials into browser tools.
What this tool does
Creates a compact JSON Web Token with a fixed HS256 header, your JSON object payload and an HMAC-SHA-256 signature.
How to use it
Enter a valid JSON object and a non-empty secret. Web Crypto signs the header.payload bytes and the copy button exposes the resulting three-part token.
Example
A payload containing sub, name and iat becomes Base64url header and payload segments followed by a signature tied to the supplied secret.
Validation
The payload must parse as a JSON object rather than an array or scalar. Invalid JSON and an empty secret prevent token generation.
How to interpret the result
A valid signature proves knowledge of the shared secret; it does not encrypt claims. Anyone holding the token can decode header and payload.
Limitations
Only HS256 is supported. The tool does not verify claims, add exp automatically, rotate keys or replace production identity infrastructure.
Privacy
All processing uses local browser APIs and this tool does not upload the values you enter.
Frequently Asked Questions
- What does JWT Generator do?
- Creates a compact JSON Web Token with a fixed HS256 header, your JSON object payload and an HMAC-SHA-256 signature.
- How does it handle invalid input?
- The payload must parse as a JSON object rather than an array or scalar. Invalid JSON and an empty secret prevent token generation.
- Is entered data uploaded?
- All processing uses local browser APIs and this tool does not upload the values you enter.
Related Tools
JWT Decoder
Decode JSON Web Tokens into readable header and payload, for free.
Base64 Encode
Encode text or strings to Base64 instantly and for free.
Hash Generator
Generate MD5, SHA-1, SHA-256 and SHA-512 hashes for free.
Cron Expression Generator
Build and validate standard five-field cron expressions in your browser.
MD5 Generator
Generate and verify a 32-character MD5 checksum from text in your browser.
SHA256 Generator
Generate a SHA-256 hash from text, for free.