{ }
DevToolsLabs

JWT Generator & Encoder (Create JSON Web Tokens Online)

JSON Web Tokens (JWT) are an open, industry standard (RFC 7519) method for representing authentication claims securely between two parties. Generate and simulate complete signed tokens manually using this tool. Your raw secret keys and PII payloads are natively signed client-side using WebCrypto, bypassing network vulnerabilities.

100% Private & Secure

This tool runs completely inside your browser using client-side WebAssembly and JS. Zero data is ever sent to our servers.

Header

JSON

Payload (Claims)

JSON

Verify Signature

HMACSHA256(base64UrlEncode(header) + "." +
base64UrlEncode(payload),
)

Encoded Token

How to use this tool

  1. Structure your JSON Header on the left. Make sure the algorithm (alg) is set to 'HS256'.
  2. Structure your intended Payload. You can add arbitrary JSON claims, such as 'role': 'admin' or 'sub': '1234'.
  3. Type your signing secret into the blue input box at the bottom.
  4. The generated cryptographic Base64Url JWT token automatically assembles on the right whenever the JSON edits are valid.

Example Usage

Input
Header: {"alg":"none"}
Payload: {"user":"guest"}
Secret: [Empty]
Output
eyJhbGciOiJub25lIn0.eyJ1c2VyIjoiZ3Vlc3QifQ.

When to use this tool

  • Crafting highly customized administrator access tokens for testing backend protected authorization routes without logging in via the frontend.
  • Simulating expired tokens by injecting a custom historical `exp` integer claim (Unix Epoch).
  • Generating internal system-to-system microservice handshake tokens signed with a shared vault key.

Frequently Asked Questions

Is my signing secret ever sent to a server?

Never. By design, our suite ensures local execution of the `crypto.subtle` API. This mathematically signs your data offline using the processing power of your native web browser. No network payloads ever contain your secret keys.

Which cryptographic algorithms are supported?

Currently, this offline JWT generator supports HMAC SHA256 (HS256) and Unsecured 'none' algorithms. RS256 (RSA Signature with SHA-256) which relies on separate Public and Private PEM keys is significantly more complex to support client-side and is slated for an upcoming system update.

Why am I getting a 'Generation Failed' syntax error?

Both the JWT Header and the JWT Payload must evaluate to strictly formatted, completely valid JSON. Ensure that all string keys and values are surrounded by double quotes (""), there are no trailing commas, and curly braces remain matched.

Why does the token change color on the right?

A JWT is actually 3 distinct Base64Url encoded segments separated by tiny periods (.). We color code them to match your input: Red represents the Header, Purple represents the Payload, and Blue represents the generated Cryptographic Signature.

More Developer Tools