search

Found

info Overview

Create an HS256, HS384 or HS512 JWT from your JSON payload and secret key, then copy it. Changing the payload, key or algorithm rebuilds the token.

📘 How to Use

  1. Enter the payload in JSON format.
  2. Set the signing algorithm and secret key.
  3. Copy the generated JWT to use for API testing.

JWT Generator & Debugger

Auto-update
JSON format
Copied!
Article

Generate JWT Debug Tokens 🛠️

Generate custom JSON Web Tokens (JWT) for API testing and local development, right in your browser.

💡 Why use this?

Simulate user states without hitting your backend. Instead of manually triggering authentication flows, use this tool to craft specific tokens for debugging.

  • Test Frontend Auth: Create tokens with specific roles or permissions to verify UI logic.
  • Debug Expiry Handling: Edit the exp (expiration) claim to test how your app handles expired sessions.
  • Test Your Backend's Signature Check: Sign tokens with your own secret key and confirm that your backend accepts them and rejects tampered ones.

Security Note: This is a client-side tool. Your payloads and secret keys stay in your browser and are never sent to a server.

📘 Quick Start

  • Customize Payloads: Edit the JSON field to include standard claims like sub and iat, or add your own custom metadata.
  • Select Algorithms: Toggle between standard HMAC algorithms: HS256, HS384, and HS512.
  • Copy and Go: The token in the result box is rebuilt whenever you change the payload, secret or algorithm. Press Copy and paste it into Postman, Insomnia, or your test scripts.

🧐 FAQ

Should I use these tokens in production? No. This tool is for debugging and testing only. Always use secure, server-side libraries (like jsonwebtoken for Node.js or ruby-jwt) to issue production tokens.

Why is the JSON invalid? Ensure your payload is a valid JSON object. Check for missing double quotes around keys or trailing commas after the last element.

Is my data private? Yes. All processing happens locally. We do not log or transmit your keys or claims.

📚 JWT Anatomy

A JWT consists of three Base64-URL encoded parts separated by dots: 1. Header: Defines the signing algorithm. 2. Payload: Contains the "claims" (the data you want to transmit). 3. Signature: Verifies that the token hasn't been tampered with.

Important: The payload is encoded, not encrypted. Anyone with the token can read your data. The security of a JWT relies on the Signature, which prevents attackers from modifying the data (like changing a user_id) without knowing your Secret Key.