Create JWT Payload Example
Try:
86 characters
141 characters
⚠️ This is an unsigned token for testing only. For production, sign tokens on your server.
💡 Tip: This tool creates JWT tokens for testing purposes only. The generated tokens have a placeholder signature and should not be used in production. Use a proper JWT library with a secret key for real applications.
Code Examples
Here's how to achieve this in different programming languages:
1// Create unsigned JWT (for testing only)2const header = { alg: 'HS256', typ: 'JWT' };3const payload = {4 "sub": "user_123",5 "name": "Test User",6 "role": "admin",7 "iat": 16162390228};910const base64UrlEncode = (obj) => {11 return btoa(JSON.stringify(obj))12 .replace(/\+/g, '-')13 .replace(/\//g, '_')14 .replace(/=/g, '');15};1617const token = base64UrlEncode(header) + '.' +18 base64UrlEncode(payload) + '.' +19 'signature';
More JWT Examples
Basic JWT Token Example
See how to decode a basic JWT token with standard claims. Learn the structure of JWT header and payload.
JWT Expiration Check Example
Learn how to check if a JWT token is expired by examining the exp claim in the payload.
Auth0 JWT Token Example
Decode a typical Auth0 JWT token with common claims like issuer, audience, and permissions.
Firebase JWT Token Example
Decode a Firebase Authentication JWT token and understand its claims structure.
API Key JWT Example
Decode a JWT-based API key and see how API permissions and scopes are encoded.
Refresh Token JWT Example
Understand refresh token JWT structure with longer expiration and token family claims.
RS256 Signed JWT Example
Decode a JWT signed with RS256 (RSA) algorithm. See the key ID (kid) in the header.