JWT Builder & Sign (HS256, Web Crypto)
Build & sign JWT tokens with HMAC-SHA256 (HS256) via the Web Crypto API. Quick claim helpers (iat, exp). For test/dev API auth — runs 100% in your browser.
Tip: use exp: 1779010042 to make the token expire in 1h.
JWT Builder signs tokens with HMAC-SHA256 (HS256) via Web Crypto API. Runs 100% in your browser, secret is NOT sent anywhere. Use for test/dev only — production should sign server-side.
When you need to build a JWT
- Test API auth: need a valid token to test a protected endpoint — generate one and paste into Postman/curl.
- Mock auth response: frontend devs don't have to wait for backend /login — fake the JWT response.
- Learn JWT: experiment with claims, signatures — see how auth actually works.
- Debug expired tokens: regenerate a token with a longer
exp.
JWT structure
<header>.<payload>.<signature>
Header: base64url(JSON header) # alg, typ
Payload: base64url(JSON claims) # sub, exp, iat, custom...
Signature: base64url(HMAC-SHA256(
header + "." + payload, secret
)) Standard claims (RFC 7519)
- iss (issuer): who issued the token.
- sub (subject): user_id the token is about.
- aud (audience): which service the token is for.
- exp (expiration time): Unix timestamp when the token expires.
- nbf (not before): earliest Unix timestamp the token is valid.
- iat (issued at): Unix timestamp when the token was created.
- jti (JWT ID): unique ID — prevents replay attacks.
⚠️ Security warnings
- HS256 vs RS256: HS256 uses a symmetric secret — issuer and verifier share the key. RS256 uses asymmetric (private/public) keys — more secure for microservices. This tool only supports HS256.
- Weak secrets: avoid short secrets (< 32 bytes). Production should use a random 256-bit secret from
crypto.randomBytes(32). - DO NOT store sensitive data in the payload: the payload is just base64-encoded (NOT encrypted) — anyone can read it. No passwords, no full credit cards.
- Production must sign server-side: this tool runs in your browser — pasting a production secret would leak it. Use for test/dev only.
Who this is for
Fullstack/backend/devops engineers — debug JWT, format JSON/SQL, parse cURL, compute CIDR subnets, draft Mermaid diagrams, write conventional commits… Daily toolkit alongside your terminal and editor.
FAQ
Is my pasted code/token sent anywhere?
No. All TopDev dev tools run 100% client-side — JWT, SQL, JSON, cURL, regex… process in-browser. Disconnect to verify. Safe for internal tokens, production DB queries, API keys.
Does it work offline / install as a PWA?
Tools work offline after the first load. Installable PWA is on the roadmap — for now you can bookmark and use without internet.
Related tools
See all tools →JWT Decoder
Decode JWT tokens — header, payload, claims with readable timestamps.
NEWText Diff
Paste 2 texts → highlight diffs at word/line/char level. Great for diffing AI outputs.
NEWJSON Schema Generator
Generate JSON Schema (Draft-07) from a sample — for LLM structured output and API validation.
NEWJSON Formatter
Format / minify / validate JSON. Sort keys A-Z, custom indent, Ctrl+Enter shortcut.