Minimal signed token
With header {"alg":"HS256","typ":"JWT"}, payload {"sub":"123"} and secret "test-secret", clicking Generate JWT produces a standard 3-part header.payload.signature token.
Create and sign JWT tokens with HS256 from a header, payload and secret — free JWT encoder.
About
Builds and signs a JSON Web Token from a header, payload and secret, using the HS256 (HMAC-SHA256) algorithm via the browser's own Web Crypto API.
Backend developers use it to hand-craft a token for testing an API without spinning up a full auth server, while students learning how JWTs work use it to see exactly how the header, payload and signature fit together. It's one of many free developer tools on Toolapt, and like every tool here, it's free to use with no sign-up and no limit on how many times you run it.
Examples
4 worked examples
With header {"alg":"HS256","typ":"JWT"}, payload {"sub":"123"} and secret "test-secret", clicking Generate JWT produces a standard 3-part header.payload.signature token.
Edit the payload to {"sub":"1234567890","name":"Ada Lovelace","admin":true} and the token regenerates instantly with those claims encoded and signed.
Keep the same header and payload but change the secret from "abc" to "xyz", and the signature segment changes completely while the header and payload segments stay identical.
Leave the payload missing a closing brace and clicking Generate JWT shows an error instead of a token, so you can fix the JSON and try again.
FAQ
Quick answers to common questions about the JWT Encoder.
It builds a JSON Web Token from a header and payload you edit as JSON, and signs it with a secret you provide, using the HS256 (HMAC-SHA256) algorithm.
Yes. It's free, with no sign-up, no watermark and no limit on how many times you use it.
Yes. The header, payload and secret you enter are processed entirely on your own device using the browser's Web Crypto API — nothing is sent to a server.
Only HS256 (HMAC-SHA256) for now. It's the most common algorithm for shared-secret JWTs; RS256 and other public-key algorithms aren't supported.
The tool shows an error message instead of generating a token, so you can fix the JSON before trying again.
No. This tool only encodes and signs a new token from a header and payload you provide — it doesn't decode or verify an existing token's signature.
Yes. The page is fully responsive and works on mobile, tablet and desktop browsers alike.
It's built for everyday HS256 token creation and testing; it doesn't support asymmetric algorithms or custom header fields beyond standard JSON editing.
Did JWT Encoder work for you?