JWT Encoder

About the JWT Encoder

This tool builds a signed JSON Web Token from a header, a payload, and a secret, using HMAC-based signing (HS256, HS384, or HS512) — the same algorithm family most APIs use for symmetric-key JWT authentication.

It's meant for testing and development: generating sample tokens to feed into an API, a Postman collection, or a local auth flow without needing a running auth server.

How it works

Common use cases

Frequently asked questions

Is a token generated here suitable for production use?

No — this tool is meant for local development and testing. In production, tokens should be issued by a proper auth server using securely stored secrets and short expiry times, never hand-built and pasted from a browser tool.

Which algorithms are supported?

HS256, HS384, and HS512 — all symmetric HMAC-based algorithms where the same secret is used to sign and verify. Asymmetric algorithms like RS256 (which use a public/private key pair) aren't supported here.

Where does my secret go?

Nowhere but your browser's memory for the duration of this page — signing happens entirely client-side and the secret is never transmitted anywhere.

Why did I get an 'Failed to encode' error?

Usually this means the Header or Payload field isn't valid JSON — check for missing commas, unquoted keys, or trailing commas before generating again.

This tool runs entirely in your browser — nothing you enter is sent to a server. Read more in the Privacy Policy, or browse the full list of tools.