01What is JWT Claims Builder?
JWT Claims Builder is for the moment you need a real, signed test token and don't want to write a throwaway script for it. You fill in the registered claims from RFC 7519 (iss, sub, aud, exp, nbf, iat and jti), add your own claims, and watch the header and payload JSON update as you type. The exp and nbf fields take a date and a time in your browser's local time zone. The tool converts them to the Unix seconds the spec asks for. iat is filled with the current time when you leave it ticked, and the Generate button next to jti creates a random UUID with crypto.randomUUID. Custom claims can be typed as String, Number, Boolean or JSON. That means roles can be a real array and a limit can be a real number. If a number or JSON value doesn't parse, it stays a string instead of turning into 0, and only the word true (any case) gives a true boolean. Claims with a blank key are dropped. When the payload looks right, enter a shared secret and sign. HS256, HS384 and HS512 use the browser's Web Crypto HMAC with SHA-256, SHA-384 or SHA-512, as RFC 7518 defines them. The token is base64url header, a dot, base64url payload, a dot, then the signature, so any standard JWT library can verify it. Here's a worked case. The payload {"sub":"user_123","iat":1700000000,"exp":1700003600,"role":"admin"} signed with HS256 gives a token whose first part is always eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9, because that's just the encoded header. Choosing none produces an unsecured token with an empty third part. That's useful for one thing: proving your server rejects it. The tool warns you when exp is already in the past, when you pick none, and when the secret is shorter than the hash output (32, 48 or 64 bytes). RFC 7518 sets that minimum, and libraries such as jose enforce it. The default placeholder secret is shorter than 32 bytes, so expect that warning until you change it. A signed token is cleared as soon as you edit anything, so what's on screen always matches the claims above it. RS256 and ES256 aren't offered, since they need a private key. Signing happens in your browser, and the secret never leaves the page.
Backend developers and QA engineers who need hand-built HMAC-signed JWTs with exact claims to test authentication, expiry and audience checks in their own APIs. The tool runs entirely in your browser, so your data never leaves your device.
02How to use JWT Claims Builder
- Pick the algorithm (HS256, HS384, HS512 or none) in the Header section and leave typ as JWT unless your API expects something else.
- Fill in iss, sub and aud, and click Generate next to jti if you want a random token ID.
- Set the exp date and time, and nbf if you need it, in your local time. Untick iat if you don't want it.
- Click Add Claim for each custom claim and choose String, Number, Boolean or JSON for its value.
- Enter the shared secret, click Generate HS256 JWT (or the matching label), and copy the token, header or payload.
03Worked examples
- Input:
iss https://auth.example.com, sub user_123, aud api (iat/exp/nbf off); custom: role=admin (string), level=5 (number), beta=TRUE (boolean), perms=["read","write"] (json) - Result:
{"iss":"https://auth.example.com","sub":"user_123","aud":"api","role":"admin","level":5,"beta":true,"perms":["read","write"]} - The boolean check is case-insensitive, so TRUE becomes true.
- Input:
sub 42; custom: n=(empty, number), bad={oops} (json), yes=yes (boolean), (blank key)=x - Result:
{"sub":"42","n":"","bad":"{oops}","yes":false} - Values that fail number or JSON parsing fall back to strings, only the word true gives a true boolean, and claims with a blank key are dropped.
- Input:
Header {"alg":"HS256","typ":"JWT"} - Result:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 - The header is base64url-encoded with no padding, which is why every HS256 token from this tool starts with the same string.
- Input:
HS256, secret test-secret-at-least-32-bytes-long!!, payload {"sub":"user_123","iat":1700000000,"exp":1700003600,"role":"admin"} - Result:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c2VyXzEyMyIsImlhdCI6MTcwMDAwMDAwMCwiZXhwIjoxNzAwMDAzNjAwLCJyb2xlIjoiYWRtaW4ifQ.2tx0pRuynPu1GXgcIEbIz7LrF6rkIVfYvCuGgp0uOIU - Computed with Node's HMAC-SHA256 over the same header and payload, matching the standard algorithm the tool uses. In the page, iat is always the current time.
- Input:
alg none, payload {"sub":"user_123"} - Result:
eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJzdWIiOiJ1c2VyXzEyMyJ9. - Unsecured JWT per RFC 7519 section 6: the signature part is empty, so the token ends with a dot.
04Common use cases
- Creating an HS256 test token for a local API or an integration test without writing a script
- Checking how a role or permission claim will look in the payload before you change your auth middleware
- Producing a token with an exp in the past or an nbf in the future to test that your API rejects it
- Generating an alg none token to confirm your server refuses unsigned JWTs
- Building a token with a specific aud to test audience checks in a gateway or resource server
- Comparing HS256 and HS512 tokens for the same payload when you're debugging a mismatched algorithm setting
05Tips
- Type JSON as the claim type for arrays like ["read","write"]. As a String it would be sent as one quoted piece of text.
- exp and nbf use your browser's time zone. If a teammate in another zone builds the same token, the Unix value will differ.
- A jti gives each token a unique ID, which you need if you plan to revoke single tokens with a deny list.
- Use a random secret at least as long as the hash, 32 bytes for HS256, and only paste test secrets into any browser tool.
- Keep payloads small. The token rides along with every request, so a role name beats a full permission list.
06Related concepts
RFC 7519, JWT claims, HMAC, Token expiration, RBAC.
Frequently Asked Questions
What is JWT Claims Builder?
JWT Claims Builder is a free, browser-based developer tool on AIDToolStack. Visual JWT claims builder with standard and custom claims and HMAC signing. It requires no installation or sign-up and works entirely in your browser.
Is JWT Claims Builder free to use?
Yes. No sign-up, no fees and no usage cap.
Does JWT Claims Builder store my data?
No. It runs in your browser; nothing is uploaded.