JWT Generator
Create signed HS256, HS384 or HS512 JSON Web Tokens.
Create signed HS256, HS384 or HS512 JSON Web Tokens. Free, instant and private in your browser.
Loading the interactive tool… This page needs JavaScript to run the JWT Generator.
How to use JWT Generator
- Paste the data, code, token, or value you need to inspect.
- Set any format, encoding, or validation options.
- Run the tool and inspect the result or diagnostic output.
- Copy the output into your terminal, editor, API client, or project.
How JWT Generator works
Pick HS256, HS384 or HS512, enter a JSON object payload and a secret, and the tool signs a JSON Web Token with HMAC using the browser's Web Crypto API. The header is fixed to the chosen alg and typ JWT. It requires a payload that is an object and a non-empty secret. Use test secrets only, because real keys should not be pasted into any website.
Worked example
Input: HS256, payload with sub 1234567890, name Ada, iat 1700000000, secret your-256-bit-secret → Output: a token starting eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 and ending with signature HBQM4veHdkNh0ou32M4fLqiJFpuZdz0ZIm0ZFPMwjMY.
Common uses
- Create a sample token to test an API's authentication middleware.
- Reproduce a token with specific claims for a unit test.
- Learn how the three parts of a signed JWT are assembled.
Best for
- debugging and development
- API work
- quick lookups
Tips for better results
- Remember JWT payloads are encoded, not encrypted.
- Validate the output before using it in production code.
- Treat tokens, credentials, and secrets as sensitive even when processing happens locally.
- For large payloads, keep an original copy so you can compare changes.
Frequently asked questions
Is it safe to use my real secret?
Use test secrets only; never paste production keys into a website.
Is my data sent to a server?
No. This tool runs in your browser, so what you enter stays on your device.
Do I need an account to use JWT Generator?
No account or sign-up is needed. Just open the tool and use it.
Related tools
- JWT Decoder — Decode JWT header and payload.
- Cron Generator — Generate cron expressions from presets.
- CSV to JSON — Convert CSV data with headers into JSON array.
- JSON to CSV — Convert a JSON array of objects into CSV data.
- JSON to TypeScript — Generate TypeScript interfaces from JSON.
- JSON to YAML — Convert JSON data into readable YAML.