JWT Encoder

Create and sign JSON Web Tokens locally. Private by design—everything runs in your browser.

Header & Payload

Tip: "typ": "JWT" will be set automatically if missing.

Claim helpers (optional)

minutes

Sign & Output

Tip: Press Ctrl/Cmd + Enter to create a JWT. You can also drop a .json file into the payload box.

About this tool

This JWT encoder helps you build a JSON Web Token quickly and safely without sending any data to a server. It is useful when you need a test token for an API, want to learn how JWTs are structured, or need to generate a signed token for a development environment. Everything runs in your browser, so secrets and keys stay on your device.

A JWT has three parts separated by dots: the header, the payload, and the signature. The header describes the signing algorithm, the payload holds claims such as user IDs or roles, and the signature proves that the token was created by a trusted party. The header and payload are JSON that get Base64URL-encoded; the signature is created by signing the exact string header.payload. Changing even one character changes the signature.

To use this tool, enter your header and payload JSON in the input fields. Choose the signing method that matches your system, then provide a secret or private key if needed. Click Generate, and the full token appears instantly. You can copy the encoded JWT into your application, Postman, or a test request.

Signing options cover common use cases. HS256 uses a shared secret string and is common for internal services. RS256 uses an RSA private key to sign and a public key to verify, which is better when multiple services need to validate tokens without sharing a secret. The none option creates an unsigned token for debugging only and should not be used in production.

Real-world examples include generating access tokens for API testing, creating short-lived tokens with expiration claims, or simulating login flows while building an authentication system. Whether you need a JWT generator, a JSON Web Token encoder, or a quick way to sign payloads, this tool provides a clear, reliable workflow.

Everything happens locally using the Web Crypto API. For highly sensitive keys, consider using the offline bundle or a dedicated local environment.

5 Fun Facts about Creating JWTs

Whitespace changes the signature

Even pretty-printing the same JSON changes the bytes you sign—tiny spacing tweaks create a totally different signature.

Canonical quirks

“none” is truly none

alg none omits the signature entirely. It’s handy for debugging but shouldn’t leave local/dev environments.

Debug only

HS256 vs RS256 changes trust

HS256 means everyone verifying also knows the secret; RS256 lets many services verify with just the public key.

Trust model

Short TTLs tame replay

Many teams mint access tokens for 5–15 minutes and rely on refresh tokens to keep sessions alive.

Expiry habit

kid is a key breadcrumb

A kid header points verifiers to the right key in a JWK set—without it, they may brute-try every candidate.

Rotation helper

Explore more tools