JWT Generator — Free Online JWT Token Generator
Free online JWT generator. Customize headers and payloads and sign JSON Web Tokens with HS256, HS384 or HS512 and your secret for authentication, API testing...
To build a JWT, edit the Header and Payload JSON and enter your secret; the tool signs the token with HS256, HS384 or HS512 as set in alg and shows it as the Generated Token.
Last updated:
JWT Generator — Free Online JWT Token Generator. Free online JWT generator. Customize headers and payloads and sign JSON Web Tokens with HS256, HS384 or HS512 and your secret for authentication, API testing, and development — all processed in your browser.
Instantly generate JWT tokens with our free JWT generator. Customize the header (algorithm, type) and payload (claims, expiry, subject), enter your secret, and get a JSON Web Token signed with HMAC (HS256, HS384 or HS512) in seconds.
Whether you are building API authentication flows, testing OAuth endpoints, generating tokens for CI/CD pipelines, or debugging JWT validation, our JWT token generator helps you create well-formed tokens without writing code.
The tool supports standard claims (sub, iat, exp, iss, aud) and any custom payload fields. Need to inspect an existing token? Our JWT Parser decodes any JWT and can verify HMAC signatures with your secret.
Our JSON web token generator runs entirely in your browser — your payload data, secrets, and authentication logic never leave your device.
The generated token follows the standard Base64Url header.payload.signature structure, with UTF-8 claims encoded correctly, ready to use in Authorization headers, cookies, or API tests.
Signing uses HMAC with your secret; RSA and ECDSA algorithms (RS256, ES256) are not supported, and alg none produces an unsigned token. To compute a raw HMAC, see our HMAC Generator.
Explore related tools: UUID Generator for unique identifiers, or Base64 String Converter for manual encoding.
Frequently asked questions
How do I generate a JWT with this tool?
Edit the Header JSON (by default alg HS256 and typ JWT), the Payload JSON with your claims, such as sub, name and iat, and the Secret. The Generated Token updates as you type; click Copy JWT to copy it. The default values reproduce the well-known jwt.io example token.
Is the generated token signed?
Yes, when alg is HS256, HS384 or HS512: the signature is an HMAC of header.payload computed with the Secret, read as UTF-8 text, so a server using the same secret accepts it. With alg none the token is unsigned and ends with a dot. RS256, ES256 and other public-key algorithms are not supported.
Is it safe to enter my real signing secret?
Signing runs in your browser with the crypto-js library and the secret is not sent to a server. Still, anyone who knows an HMAC secret can create valid tokens, so prefer a test secret and never share production secrets or the tokens made with them.
Why is the Generated Token empty?
Both fields must contain a strict JSON object; if either is invalid, Invalid JSON in Header or Payload appears. The output is also empty when alg is not HS256, HS384, HS512 or none, or when an HMAC algorithm is selected and the Secret is empty. Emoji, accents and Cyrillic text are encoded as UTF-8.
How do I add an expiry time to the payload?
Add an exp claim with a Unix timestamp in seconds, for example "exp": 1893456000 for 1 January 2030. Other registered claims such as iat, nbf, iss and aud, or any custom claim, are added the same way.
How to use this online tool
JWT Generator — Free Online JWT Token Generator is designed for fast browser workflows when you need to format, validate, convert, decode, encode, generate, or inspect data without opening a heavy desktop app. Start with the input field or visible options, review the result, then copy or download the output for the next step.
Private processing in your browser
JWT Generator — Free Online JWT Token Generator keeps the normal processing step local in your browser. That is useful for code snippets, tokens, documents, configuration values, text samples, and other material that should not be sent to a remote service unless you explicitly choose to share it.
When this tool is useful
Use JWT Generator — Free Online JWT Token Generator for repeatable developer tasks, technical documentation, QA checks, quick conversions, debugging, content cleanup, and internal team workflows. The page focuses on clear inputs, immediate feedback, and output that is easy to reuse in code, reports, tickets, emails, or notes.
Practical tips
Before copying the final result, check important details such as spacing, casing, filenames, encoding, token structure, line breaks, or output format. Small checks prevent mistakes when the result is reused in source code, API requests, documentation, spreadsheets, or shared files.