Loona Automation logoLoona Developer Tools
Home › Encoders & Decoders

JWT Encoder — Create & Sign HS256 Tokens

In short: build a JWT from your payload JSON and sign it with HS256 and your secret — entirely locally with WebCrypto (or choose alg none for unsigned test tokens).
🔒 Private by design: everything runs in your browser on this device. Your input is never uploaded to a server.

About

A JWT is three Base64url parts joined by dots: header, payload, signature. This encoder builds the first two from your JSON (header fixed to {"alg", "typ":"JWT"}) and, for HS256, signs header.payload with HMAC-SHA256 via WebCrypto — the same operation your auth server performs. The decoder companion on this site inspects tokens; this page creates them, which is what local development and API testing constantly need. Two standing warnings: a JWT is signed, not encrypted — never put secrets in the payload; and a test secret typed here is fine, but production keys belong in your secrets manager, not in any browser tool, including this local one.

Frequently Asked Questions

What is the iat in the sample?

Issued-at time as a Unix timestamp (seconds). Servers check exp/nbf/iat claims; the NumericDate format is always seconds since the epoch.

Why does the signature change if I edit one character?

The signature covers the exact bytes of header.payload; any change invalidates it — that is the integrity guarantee JWTs exist for.

Related Developer Tools

Embed this tool on your website — free

Add this tool to your own website or blog — it is completely free, needs no sign-up, and always shows the latest version. Copy the code below and paste it into your page where you want the tool to appear. Keeping the small “Powered by Loona Automation” credit line under the embed helps keep this tool free — but you are free to style or remove it; the tool works either way.