JWT Encoder
Build and sign JSON Web Tokens in your browser — compose the header and claims, sign HS256, HS384 or HS512 with your secret, and get a ready token.
Loading tool controls…
Verify it yourself: press F12, open the Network tab, and use this tool — your files are never uploaded.
JWT Encoder at a glance
- Price
- Free
- Account
- Not required
- File uploads
- None — your files are never uploaded
- Category
- Developer Tools
Who uses Developer Tools?
Developers and engineers formatting JSON, testing regex, hashing data, encoding values or building API requests.
How to Use JWT Encoder
Follow these simple steps to get instant results in your browser.
Pick an Algorithm and Secret
Choose HS256, HS384 or HS512 and type a test secret — for example my-test-secret-123.
Fill in the Claims
Enter sub, iss and aud, pick exp and nbf dates (converted to epoch seconds for you), and add custom claims as JSON.
Sign and Verify
Click Sign token, copy the result, then click Verify round-trip to confirm the signature matches the secret.
What is JWT Encoder & How Does It Work?
JWT Encoder builds and signs JSON Web Tokens in your browser. Compose the header and the claims — sub, iss, aud, exp, nbf, iat and any custom claims as a JSON object — pick HS256, HS384 or HS512, type a secret, and get a ready-to-use token: three Base64URL parts joined by dots, signed with Web Crypto (HMAC).
The token can be verified immediately: “Verify round-trip” re-checks the signature with the same secret, and the decoded header and payload are shown underneath. Paste the token into the JWT Decoder tool to read the claims back — the decoder is decode-only, so use the round-trip check for the signature itself.
This is HMAC-only v1: RS256 is not supported, because it needs a private key and this page does not accept one. And it is for test tokens only — the secret never leaves your browser, but never sign a production token with a secret typed into any web page, including this one.
Key Features & Capabilities
HS256, HS384, HS512
HMAC signing with SHA-256, SHA-384 or SHA-512, via Web Crypto.
Full Claims Editor
sub, iss, aud, exp, nbf, iat plus custom claims as a JSON object.
Epoch Conversion
Pick exp and nbf as dates; the epoch-seconds value is shown under the field.
Round-Trip Verify
Re-checks the signature with the same secret, in the browser.
HMAC-Only, Labelled
RS256 is not supported here — the page says so plainly.
Pro Tips
- •Bookmark this tool for instant one-click access anytime.
- •Drag and drop files directly onto the input surface for fastest handling.
- •All processing happens in your browser session for maximum speed and data safety.
🎯 Common Use Cases
JWT Encoder - Token Structure
A JWT has three Base64URL-encoded parts joined by dots: the header ({"alg": "HS256", "typ": "JWT"}), the payload (the claims), and the signature — the HMAC of the first two parts, keyed with the secret. HS384 and HS512 use SHA-384 and SHA-512 in the same construction. Anyone can decode the first two parts; only the secret holder can make a valid signature.
Worked Example
- 1Header {"alg": "HS256", "typ": "JWT"} → eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9
- 2Payload {"sub": "user-123", "iss": "pixeltools-demo"} → eyJzdWIiOiJ1c2VyLTEyMyIsImlzcyI6InBpeGVsdG9vbHMtZGVtbyJ9
- 3Signature = HMAC-SHA256("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c2VyLTEyMyIsImlzcyI6InBpeGVsdG9vbHMtZGVtbyJ9", secret), Base64URL-encoded — the third part of the token
Sources & Further Reading
- JSON Web Token (JWT) — RFC 7519 — IETF
- JSON Web Signature (JWS) — RFC 7515 — IETF
- SubtleCrypto — MDN Web Docs
Frequently Asked Questions about JWT Encoder
Frequently asked questions
More Developer Tools
Complementary utilities for your workflow
JWT Encoder
Sign JWTs with HS256/384/512 — header, claims, secret in.