#1 Free Web Utility • 100% Client-Side Sandboxed

Keycloak JWT Decoder — Inspect Realm & Client Roles

Decode Keycloak access tokens instantly. Inspect realm_access, resource_access, and nested client roles securely in your browser for open-source IAM debugging.

Zero Server Uploads
No Registration Required
Instant Browser Processing
100% Free Forever

Client-Side Processing

All calculations and asset transformations happen in your browser memory. Your files never leave your device.

Complete Data Privacy

Zero tracking telemetry, zero cloud database persistence, and automatic memory cleanup on tab close.

Unlimited Free Usage

No artificial limits, no subscription walls, no watermarks, and no signups needed to execute unlimited workflows.

High-Speed Operations

Optimized HTML5 and WebAssembly engines perform algorithmic conversions within milliseconds with zero server lag.

Simple 3-Step Process

How to Decode Keycloak IAM Access Tokens

Execute your tasks within seconds through our streamlined browser-native pipeline.

01

Stage Target Files

Select or drag & drop your files securely into the browser workspace sandbox without transmitting data to remote servers.

02

Configure & Process

Fine-tune your parameters visually and let the client-side Keycloak JWT Decoder Inspect Realm & Client Roles engine optimize your data instantly.

03

Download Master Output

Extract and save your pristine, high-fidelity processed document directly back to your local device memory.

Tooloraa Icon

Comprehensive Technical Guide & Overview

Written by Tooloraa Engineering Team • 100% Free & Open Guide

Keycloak is the powerhouse for open-source Identity and Access Management (IAM), widely used to secure microservices, Spring Boot applications, and enterprise portals. However, Keycloak's token structure is notoriously complex, featuring deeply nested JSON objects for role mappings that can be difficult to read in raw format. Our Keycloak JWT Decoder is engineered specifically to help developers unpack these nested structures, verify client-specific roles, and debug authorization logic securely.

Because Keycloak tokens govern access to your entire infrastructure, pasting them into generic online debuggers is a severe security risk. Our tool processes everything locally in your browser, ensuring your production session data never leaves your device.

Decoding Keycloak's Nested Role Structures

Unlike Auth0 or Okta, which often flatten roles into a simple array, Keycloak uses a highly structured, nested approach to differentiate between global realm roles and application-specific client roles. The decoder formats these complex objects cleanly.

1. Realm Roles (realm_access)

Realm roles are global to the entire Keycloak realm. They apply to the user regardless of which application they are logging into. In the decoded payload, you will find them nested under the realm_access object:

{
 "realm_access": {
 "roles": ["offline_access", "uma_authorization", "admin"]
 }
}

2. Client Roles (resource_access)

Client roles are specific to a particular application (client) registered in Keycloak. They are nested under the resource_access object, keyed by the Client ID:

{
 "resource_access": {
 "my-frontend-app": {
 "roles": ["editor", "viewer"]
 },
 "my-backend-api": {
 "roles": ["api:write"]
 }
 }
}

The decoder highlights these nested structures, making it instantly clear which roles belong to which application.

Inspecting Keycloak Scopes and Protocol Mappers

Keycloak uses Protocol Mappers to inject data into the token. If you have configured a mapper to include the user's email, groups, or custom attributes, the decoder will show you exactly what was injected. The scope claim will list the OAuth2 scopes requested by the client, while custom mappers will appear as root-level claims or nested objects depending on your configuration.

Keycloak ClaimPurposeWhat to Check in Decoder
preferred_usernameThe user's login nameEnsure it matches the expected identity format.
typ (Header)Token typeShould be `Bearer` for Access Tokens, `ID` for ID Tokens.
session_stateKeycloak session UUIDUseful for correlating logs and forcing remote logouts.
allowed-originsCORS configurationVerify your frontend URL is listed to prevent CORS errors.

Debugging Spring Boot and Microservices Authorization

If you are using Spring Security with Keycloak, your backend relies heavily on the resource_access and realm_access claims to grant method-level security (e.g., @PreAuthorize("hasRole('api:write')")). If a 403 Forbidden error occurs, pasting the token into this decoder is the fastest way to verify that Keycloak actually issued the required role to the user for that specific client.

Security: Protecting Open-Source Infrastructure

Keycloak is often used to secure highly sensitive internal infrastructure and government portals. A leaked Keycloak Access Token could grant an attacker administrative access to your entire realm. Our 100% client-side architecture guarantees that your IAM credentials are parsed in your browser's sandbox and never transmitted to an external server.

Troubleshooting Common Keycloak Errors

  • Missing client roles: Ensure the 'Client Roles' mapper is enabled in your Client Scope settings. By default, Keycloak may not inject client roles into the Access Token unless explicitly mapped.
  • "Invalid audience" error: Check the azp (Authorized Party) and aud claims. The azp must match the Client ID of the application that requested the token.

Final Thoughts

Keycloak's flexibility is its greatest strength, but also its greatest debugging challenge. The Keycloak JWT Decoder cuts through the nested JSON complexity, giving developers instant, secure visibility into realm roles, client roles, and protocol mappers, accelerating your microservices security workflow.

Ready to Use Keycloak JWT Decoder Inspect Realm & Client Roles?

Fast, secure, and private execution right in your browser.

Launch Tool Free
Got Questions?

Frequently Asked Questions

Everything you need to know about Tooloraa's free, client-side web utility suite.

Copy the JWT string returned by your Keycloak OIDC login flow and paste it into the decoder. The tool will instantly parse the header and payload, cleanly formatting the complex nested role objects.
Client roles are nested under the `resource_access` object, keyed by the Client ID. For example, roles for 'my-app' will be found at `resource_access.my-app.roles` in the decoded payload.
Yes, it is 100% safe. The decoding engine runs entirely client-side in your browser. Your Keycloak session tokens are never transmitted over the network, ensuring your open-source IAM infrastructure remains secure.
`realm_access` contains global roles that apply to the entire Keycloak realm. `resource_access` contains roles that are specific to individual applications (clients) registered within that realm.
Keycloak follows the OAuth2 specification, which dictates that Access Tokens should have a `typ` (Type) header of `Bearer` to indicate how the token should be presented to the resource server (via the Authorization: Bearer header).
No, it is a decoder and inspector. To verify the signature, your backend must fetch Keycloak's public keys from your realm's JWKS endpoint (e.g., `/realms/{realm-name}/protocol/openid-connect/certs`) and validate the `kid` in the header.
By default, Keycloak does not include groups in the token. You must configure a 'Group Membership' Protocol Mapper in your Client Scope to inject the groups array into the payload, which will then be visible in the decoder.
The `session_state` claim is a UUID generated by Keycloak to track the user's active SSO session. It is useful for backend administrators who need to correlate API requests with specific browser sessions or force remote logouts via the Admin API.
Look for the `allowed-origins` array in the decoded payload. Keycloak injects this based on the Client's 'Web Origins' configuration, helping your frontend applications verify CORS permissions.
Ensure the mapper is assigned to the correct Client Scope (e.g., 'profile' or a custom scope) and that the frontend application actually requested that scope during the OAuth2 authorization flow.
100% Free & Unlimited Access

Ready to Start Using Keycloak JWT Decoder Inspect Realm & Client Roles?

Experience fast, private, and powerful client-side execution with zero file queues, zero fees, and zero software downloads.

Decode Keycloak JWT
No Sign-Up
No Installation
Private & Secure