JWT Generator

Enter a JSON payload and an optional secret.

Use this tool

Result

The result appears in this panel after you run the tool.

About this tool

The token is text/jwt so the JWT decoder can read it next. The secret is not the chained artifact.

The signature is HS256 only. The secret stays on this page and is not sent to analytics.

How to use it

  1. Open this page and provide the input it asks for.
  2. Set the options that are visible, then use Create token.
  3. Read the result in the panel. Copy it or download it when a file is offered. The input stays in this browser.

Limitations

HS256, or a trailing dot if the secret is empty

The header is fixed

The payload box is parsed as JSON, and an empty box is parsed as an empty object. The header is always the object with alg HS256 and typ JWT. Both objects are JSON, then base64, then turned into base64url by swapping plus and slash for minus and underscore and stripping trailing equals signs. The signing input is those two segments joined by a dot. That encoding is not encryption. Anyone can decode the segments. The JWT decoder on this site will show them and will not check a MAC.

If the secret is empty or only whitespace, the page returns the two segments plus a trailing dot and a status line that the token is unsigned and that a secret is required for HS256. The header still says HS256. That combination is easy to misuse: a consumer that trusts the alg field without a real verify step would treat an unsigned token as if a MAC algorithm had been applied. This generator will still emit that shape, because an empty secret is an explicit choice. Add a secret when you want a MAC.

What the secret becomes

A non-empty secret is UTF-8, imported as raw key material for HMAC-SHA-256, and used to sign the signing input. The signature bytes are base64url-encoded and appended as the third segment. The algorithm is only HS256. There is no RS256, no ES256, and no menu for none. The secret is not written into the token. It stays in the form. The token text is what a later decoder can open. Verification needs the same secret and a real HMAC check, which the decoder page does not perform. A match you compute yourself, or on the HMAC page with the right input, is the check. Do not confuse a successful decode with that check.

Failures

Payload that is not JSON throws from the parser, and you get the error instead of a token. The secret is not parsed as JSON or as a PEM key. A short secret is allowed. The construction has no expiry unless you put exp in the payload yourself. The page does not add iat or nbf. It does not encrypt the claims. A JWE is a different object. If the goal is to hide the JSON, signing is the wrong tool: the payload is still readable base64url.

Privacy

Your input is processed in your browser and is not uploaded to UtilChain. File names, text, and results are not sent to analytics.