Tools/Supabase RLS Policy Debugger
Free tool — runs entirely in your browser

Supabase RLS Policy Debugger

Paste the error Postgres gave you, or your CREATE POLICY statement, and get the diagnosis: which clause rejected you, why, and the corrected SQL. Nothing you paste leaves your browser.

What this tool detects

The analyzer matches the real failure signatures we have debugged and documented — each diagnosis links to the deep-dive article with the full explanation and test steps.

new row violates row-level security policy

WITH CHECK rejected the row on INSERT/UPDATE — wrong user_id, missing session, or no INSERT policy for the roleread the fix

infinite recursion detected in policy for relation

The policy queries its own table — fix with a SECURITY DEFINER helper functionread the fix

permission denied for table

A missing GRANT, not RLS — the role cannot touch the table at allread the fix

Query succeeds but returns 0 rows

Silent RLS filtering — auth.uid() is NULL or the policy targets another roleread the fix

Storage upload blocked

storage.objects has its own policies — bucket_id and folder checks requiredread the fix

Works with service_role, fails with anon key

service_role bypasses RLS entirely — the policies ARE the differenceread the fix

Shipping to production?

RLS is one line of the pre-deploy story. The full checklist covers auth redirects, cookies, middleware, env vars and cache behaviour for Next.js + Supabase apps.

Open the production checklist