Free JWT encoder — build and sign a JSON Web Token (HS256/384/512) in your browser

Supports HMAC algorithms (HS256/384/512). RS/ES tokens require a private key and are not generated here.

Encoded JWT (HS256)

Click “Generate token” to sign your JWT...

Signing runs locally with the Web Crypto API — your payload and secret never leave your browser.

🔏 JWT Encoder — Free Online Tool

Generate and sign JSON Web Tokens (HS256/384/512) online, free. A JSON Web Token (JWT, RFC 7519) is a compact, URL-safe credential made of three Base64URL parts — header.payload.signature. This encoder takes your JSON claims and a secret, Base64URL-encodes the header and payload, and signs them with HMAC (HS256, HS384 or HS512) using the browser's Web Crypto API, producing a complete, verifiable token without your secret ever leaving the page.

🚀 Why use this JWT Encoder tool?

Signing runs 100% client-side with the Web Crypto API (SubtleCrypto.sign) — your payload and secret are never uploaded, which matters because the secret can mint valid tokens for your system. 100% free, no registration, and complete privacy — everything runs locally in your browser, so your data never touches a server.

Key Features

✍️Sign with HMAC

Generate a signed token using HS256, HS384 or HS512 — the symmetric algorithms used by most APIs for service-to-service tokens.

🧩Edit claims directly

Type any JSON payload — registered claims like sub, iat and exp plus your own custom fields — and the token rebuilds on demand.

🔤Correct Base64URL

Header and payload are Base64URL-encoded (not standard Base64), with padding stripped, exactly as the JWT spec requires.

🔒100% private

Your payload and signing secret are processed locally via Web Crypto; nothing is sent to a server, so it is safe for real keys.

Popular Use Cases

API development

  • Mint test access tokens
  • Reproduce a token a service expects
  • Try different claim sets quickly

Auth debugging

  • Generate a token with a known exp
  • Test how your verifier handles claims
  • Compare signatures across secrets

Learning

  • See how header+payload form the signature
  • Understand HS256 vs HS512
  • Teach JWT structure hands-on

What It Handles

Signs

  • HS256
  • HS384
  • HS512

Builds

  • Base64URL header
  • Base64URL payload
  • HMAC signature

Privacy

  • Web Crypto API
  • No network calls
  • Runs offline

Sources & References

Frequently Asked Questions

What does a JWT encoder do?

It assembles a JSON Web Token from your claims and a secret: it Base64URL-encodes a header ({"alg":"HS256","typ":"JWT"}) and your JSON payload, joins them with a dot, then signs that string with HMAC and appends the Base64URL signature — producing the standard header.payload.signature token.

Which algorithms are supported?

This tool signs with the HMAC family — HS256, HS384 and HS512 — which use a single shared secret. RS256/ES256 and other asymmetric algorithms require a private key and a different signing flow, so they are intentionally not generated here.

Is this a free alternative to jwt.io for creating tokens?

Yes. It generates signed HS256/384/512 tokens for free with no signup, and unlike pasting a secret into a hosted debugger, the signing happens entirely in your browser so your secret never reaches a server.

Is the payload encrypted?

No. A JWT is signed, not encrypted — the header and payload are only Base64URL-encoded, so anyone with the token can read them. Never put passwords, secrets, or sensitive personal data in the payload.

How do I make the token expire?

Add an exp claim to the payload as a Unix timestamp (seconds since 1970). For example, "exp": 1893456000. Verifiers reject the token once the current time passes exp; you can also add nbf (not-before) and iat (issued-at).

Is it safe to enter my signing secret?

Yes — the secret is used locally by the Web Crypto API and never transmitted or stored. Because the secret can create valid tokens, only ever enter it into tools whose client-side, no-upload behavior you can confirm, as this one is.

🎓 Pro Tips

  • Tip 1: Keep payloads small — a JWT travels in headers, and large tokens waste bandwidth on every request.
  • Tip 2: Always set exp so tokens are short-lived; pair them with a refresh-token flow rather than long-lived JWTs.
  • Tip 3: Use a high-entropy secret of at least 256 bits for HS256 — a weak secret makes the signature brute-forceable.