Free Supabase JWT role decoder
Short answer: decode a legacy Supabase JWT locally to inspect its role claim, while keeping the token in your browser and off the server. This guide explains what to verify and what the public scan cannot prove, without logging in, changing records, or treating an inconclusive response as a pass.
What the Supabase JWT role decoder check covers
The decoder reads the payload segment of a legacy JWT locally in your browser. It does not verify the token signature, contact Supabase, or determine whether the token remains valid.
This free checker is an entry point into a broader read-only scan. Its output is evidence about a specific public response or browser asset, not a guarantee that the application, provider account, or private backend is safe.
The role claim can distinguish common anon and service_role tokens, while newer sb_publishable and sb_secret keys use prefixes rather than the legacy JWT format.
Understand the evidence before changing code
Decoding is not authentication: anyone can read a JWT payload, and changing its text invalidates the signature. Never treat a visible role claim as proof that a token is trusted or unexpired.
Run the check against a production URL you own or are authorized to test. The browser-visible configuration is already public; never paste a secret value into the checker, a support ticket, or an AI prompt.
Apply the narrow, safe change
If a legacy service_role token appears in browser code, rotate it through Supabase's key-management process and move its privileged operation to a server function. A decoded anon role still depends on RLS policies.
const payload = token.split(".")[1];
const base64 = payload.replace(/-/g, "+").replace(/_/g, "/");
const claims = JSON.parse(atob(base64));
console.log(claims.role);Results distinguish a confirmed response from a blocked or ambiguous one. A timeout, authentication wall, empty dataset, or host-level denial may prevent a conclusion; the tool should not turn missing evidence into a green result.
Verify the production result
Use a non-production sample when possible. If you inspect a live private token, avoid copying it into a remote tool; the local decoder intentionally keeps the value in the page.
If the checker finds an issue, use the linked repair guide to change the correct deployment setting. Keep least privilege, review the diff, and avoid disabling access controls just to make the status change.
Keep the issue from returning
Verify the project reference and expiration claim carefully, then use provider controls to rotate credentials. Keep a build scan to catch private key prefixes in future releases.
Re-run the checker after deployment and compare the new response with the original finding. If a CDN or build cache is involved, verify the actual public asset rather than assuming a successful deploy invalidated every copy.
Limits and next steps
The decoder does not validate signatures, check provider permissions, or confirm whether a key was revoked. It is a convenience for reading claims, not a security audit.
The check is designed to avoid reading private application records. Where a provider offers a count-only or metadata response, the tool reads only that signal; it does not need row contents to explain the boundary.
A passing result covers only the advertised check and its observable surface. It does not replace dependency review, authenticated authorization tests, incident response, or a security assessment of code the public scanner cannot see.
Key facts
- JWT payloads are readable without a signing secret.
- Local decoding does not validate the token signature.
- Supabase publishable and secret key formats are not legacy JWTs.
Questions
Can a clean Supabase JWT role decoder check prove the app is secure?
What should I do first if the finding is real?
Does ProofForge change application data?
What should I do after the repair?
Official documentation referenced
Related
Last updated 2026-11-25 · Reviewed by ProofForge · Methodology · Markdown