JWT GENERATOR
Build a header and payload, sign it with an HS256/384/512 secret, and get a working JWT — signed right in your browser.
In short
Build and sign a JSON Web Token from a header, payload, and HMAC secret (HS256/384/512), computed with the browser's Web Crypto API. No account, no upload — the token is signed entirely in your browser.
—
How to generate a JWT
- 1
Pick an algorithm: HS256, HS384, or HS512.
- 2
Edit the header and payload JSON — the alg field in the header is kept in sync automatically.
- 3
Type the HMAC secret key that should sign the token.
- 4
Copy the signed token from the box at the bottom.
Questions
- Why only HS256/384/512 and not RS256 or ES256?
- HS* algorithms sign with a single shared secret, which is what this tool's secret-key field is for. RS*/ES* need a private key and are typically generated server-side with proper key management, not typed into a browser field — for those, use a backend library or your identity provider's tooling.
- Is my secret sent anywhere?
- No. Signing happens locally with the browser's built-in Web Crypto API (crypto.subtle.importKey / sign) — the secret and the token never leave your machine.
- Do I need to include exp or iat myself?
- Yes — this tool signs exactly the payload JSON you provide, it doesn't add or manage claims for you. Add exp, iat, iss, or any other claims you need directly in the payload editor, as Unix timestamps where required.
- Can I decode a token I already have instead?
- This tool builds and signs new tokens. If you need to inspect or verify an existing JWT, use the JWT Decoder tool instead — it decodes the header/payload and can verify the signature against a key you provide.
- Why does the header always show the algorithm I picked?
- The signed alg claim always has to match the algorithm actually used to compute the signature, so this tool overwrites whatever alg value you typed in the header editor with the one you selected above it before signing.
Related tools
- PIN GeneratorGenerate random numeric PINs of any length, with an option to avoid adjacent repeats.
- Password Strength CheckerEstimate a password's entropy and crack time, with specific tips to make it stronger.
- HMAC GeneratorCompute an HMAC-SHA1/256/384/512 of a message with a secret key, right in your browser.
- Data URI GeneratorTurn a file into a data: URI you can paste straight into CSS or HTML, with a live preview.
- Hash GeneratorGenerate SHA-1, SHA-256, SHA-384, and SHA-512 hashes from text.
- Hex ConverterConvert text to hexadecimal and back, both directions in one tool.
- Binary ConverterConvert text to binary and back, both directions in one tool.
- Base32 ConverterConvert text to Base32 and back using the RFC 4648 alphabet.
Updated