🔐 Developer Tools

JWT Encoder

Build and sign a JSON Web Token in seconds. Edit the header and payload, pick an algorithm, add your secret or private key, and get a ready-to-use signed JWT — all privately in your browser.

HMAC uses a shared secret. Switch algorithm to RS/PS/ES to sign with a PEM private key.

Signed JWT live

Your signed token will appear here…
Sign in the browser

Generate signed tokens with the Web Crypto API — no server, no libraries, no exposure of your keys.

Many algorithms

HMAC (HS), RSA (RS/PS), and ECDSA (ES) are all supported for real, verifiable signatures.

Quick claims

Add iat, exp, and nbf with one click, and format your JSON instantly.

Private by design

Your secret, private key, and generated token never leave your device.

How it works

ToolAdda base64url-encodes your header and payload, joins them with a dot, and signs that string with your secret or private key using the selected algorithm. The signature is appended to produce a complete header.payload.signature token that other services can verify.

Privacy notice

All signing happens locally in your browser. Your secret, private key, payload, and generated token are never uploaded, logged, or stored on any server.

Frequently asked questions

How do I generate a JWT?

Pick an algorithm, edit the payload with your claims, enter your secret or private key, and the signed token appears instantly on the right.

Are my secret and key safe?

Yes. Signing runs entirely in your browser with the Web Crypto API — nothing is sent anywhere.

What key format do RS/PS/ES need?

A PEM private key in PKCS#8 format (begins with -----BEGIN PRIVATE KEY-----).

Can I verify the token I created?

Yes — open it in our JWT Debugger and check the signature with the matching secret or public key.

Is it OK to store sensitive data in the payload?

No. The payload is only encoded, not encrypted, so anyone can read it. Keep only non-sensitive claims.

Which algorithm should I use?

HS256 is common for simple shared-secret setups; RS256 and ES256 are preferred when different parties verify with a public key.

Free online JWT encoder and signer

The JWT Encoder by ToolAdda lets developers quickly craft and sign JSON Web Tokens for testing authentication, APIs, and integrations. Edit the claims, choose the signing algorithm, and generate a valid token you can paste into requests or verify elsewhere — without installing anything or exposing your keys to a server.

How to use

  1. Choose your signing algorithm.
  2. Edit the header and payload claims.
  3. Enter your secret or private key and copy the signed token.

Benefits

  • Real, verifiable signatures for HS, RS, PS, and ES.
  • Live output with one-click copy.
  • Private, free, and no sign-up.

What a JWT is actually made of

A JSON Web Token is three Base64url segments joined by dots: header.payload.signature. The first two are simply JSON that has been encoded, not encrypted — anyone holding the token can read them.

  • Header — which algorithm signed the token, and its type.
  • Payload — the claims: who the token is about, who issued it, when it expires, and whatever else you add.
  • Signature — proof that the first two parts have not been altered since they were signed.

The signature is the whole point. It does not hide anything; it guarantees that nobody has edited the payload in transit. Change one character of the payload and the signature no longer matches.

A JWT is not encrypted

This is the mistake that causes real breaches, so it is worth being blunt about. Base64 is encoding, not encryption. Anyone who obtains the token can decode the payload in one step and read every claim inside it.

So never put anything secret in a JWT payload: no passwords, no card numbers, no personal data you would not hand to whoever holds the token. Put an identifier in the token and keep the sensitive data on your server, where the token is used to look it up.

Choosing an algorithm

FamilyHow it worksUse when
HS256 / HS384 / HS512One shared secret both signs and verifiesThe same system issues and checks the token.
RS256 / RS384 / RS512A private key signs, a public key verifiesOther parties must verify without being able to issue.
ES256 / ES384Elliptic curve — same split, smaller keysSame as RS, when you want shorter signatures.

The distinction that matters: with HS, anyone who can verify a token can also mint one, because it is the same secret. With RS and ES, you can hand out the public key freely and still be the only party able to issue tokens. If a third party needs to check your tokens, you want RS or ES.

If you use HS, the secret must be genuinely long and random. A short or guessable secret can be brute-forced offline from a single captured token, at which point anyone can forge tokens that your system will trust.

The standard claims worth setting

  • exp — expiry. Always set one. A token without an expiry is valid forever, including after it leaks.
  • iat — issued at. Useful for auditing and for invalidating everything issued before a certain moment.
  • sub — subject: who the token is about.
  • iss — issuer: who created it, so a verifier can reject tokens from elsewhere.
  • aud — audience: which service the token is meant for, so it cannot be replayed against another.
  • nbf — not before, if the token should only become valid later.

Short expiries are the single most effective protection. A leaked token that expires in fifteen minutes is a much smaller problem than one that lasts a year.

Signing happens in your browser

The token is built and signed on your device using the browser's own Web Crypto implementation. Your secret or private key is never transmitted, which is the only acceptable arrangement for a tool like this — a signing key pasted into a remote service should be considered compromised from that moment.

Even so, treat tokens made here as test tokens. For production signing, use your own infrastructure and keep keys in a secrets manager rather than a browser tab.

Frequently asked questions

What is a JWT made of?

Three Base64url segments joined by dots: header, payload and signature. The header names the signing algorithm, the payload holds the claims, and the signature proves the first two parts have not been altered since they were signed.

Is a JWT encrypted?

No, and this is the single most important thing to understand. Base64 is encoding, not encryption. Anyone holding the token can decode the payload and read every claim in it. The signature proves the token has not been tampered with; it does not hide anything.

So what should I never put in a JWT?

Anything you would not hand to whoever holds the token: passwords, card numbers, personal data. Put an identifier in the token and keep the sensitive data on your server, where the token is used to look it up.

Which signing algorithm should I choose?

HS256 when the same system both issues and verifies tokens, because it uses one shared secret for both. RS256 or ES256 when other parties need to verify tokens without being able to create them, because those split signing and verification into a private and a public key.

What is the practical difference between HS256 and RS256?

With HS256, anyone who can verify a token can also mint one — it is the same secret. With RS256 you can publish the public key freely and remain the only party able to issue tokens. If a third party has to check your tokens, you want RS256 or ES256.

How long should my HS256 secret be?

Long and genuinely random — treat it like a cryptographic key rather than a password. A short or guessable secret can be brute-forced offline from a single captured token, after which anyone can forge tokens your system will accept.

Is my secret or private key sent anywhere?

No. The token is signed on your device using the browser's own Web Crypto implementation, so the key never leaves the page. A signing key pasted into a remote service should be treated as compromised from that moment.

Can I use tokens made here in production?

Treat them as test tokens. For production, sign on your own infrastructure and keep keys in a secrets manager rather than a browser tab. This tool is for building, inspecting and debugging tokens during development.

Which claims should I always set?

An expiry (exp) above all — a token without one is valid forever, including after it leaks. Beyond that, iat for issued-at, sub for who the token is about, iss for who issued it, and aud so the token cannot be replayed against a different service.

How long should a token last?

As briefly as your flow allows. Short expiries are the most effective protection there is: a leaked token that expires in fifteen minutes is a far smaller problem than one lasting a year. Use refresh tokens for longer sessions.

Can I revoke a JWT?

Not directly, and this is the main trade-off of the format. A signed token stays valid until it expires, because verification does not involve your server. If you need revocation, keep a denylist of token identifiers or use short expiries with refresh tokens.

Why is my token being rejected?

Usually one of four things: it has expired, the verifying side has a different secret or key, the algorithm does not match what the verifier expects, or the audience or issuer claim does not match. Decode the payload first — the reason is normally visible in the claims.

What is the difference between this and a JWT decoder?

This tool builds and signs a new token from claims you provide. A decoder takes an existing token apart so you can read its header and payload and check its signature. Both are linked from the site.

Is this tool free?

Yes, with no sign-up and no limit. Everything runs in your browser.