Free Supabase RLS Checklist for Tables, Roles and Policies
Record what anon and authenticated should reach in each table, paste your policy SQL, and copy two-user test cases and read-only SQL checks. It runs in your browser.
Last updated 15 November 2026
This Supabase RLS checklist turns what you intend for each table into something you can test. List up to 30 tables, say whether each holds rows that belong to one user or one organisation, and choose what the anon and authenticated roles are meant to reach for SELECT, INSERT, UPDATE and DELETE: nothing, their own rows only, or every row. If you have your Supabase RLS policies as SQL, paste them, and the tool sets each CREATE POLICY statement beside the answer it relates to and raises points to review, such as a command no policy names or an expression that is simply true. It then writes two-user test cases and three read-only SQL statements to run on your own project. The tool reads text only and never connects to a project, so the result is a review checklist, not a check of your database. The guide below explains each point in the words of the PostgreSQL and Supabase documentation.
How to use this tool
- 1
List your tables and answers
Type each table name as you would in SQL, up to 30 tables, or press Load an invented example. The box for rows that belong to one user or one organisation starts ticked: untick it for a shared table. Then choose what anon and authenticated are meant to reach for each operation. A new table starts with anon at nothing and authenticated at own rows only.
- 2
Paste your policy SQL, if you have it
This step is optional. Paste CREATE POLICY and ALTER TABLE row level security statements, up to 50,000 characters and 200 CREATE POLICY statements. Do not paste a project address, a key or a password.
- 3
Build the checklist
Press Build the checklist. The matrix shows your answer in every cell and, where SQL was pasted, the policies that name that table, command and role. Under it are what the tool read from the paste and the points to review.
- 4
Copy the test cases and the SQL
Copy the two-user test cases and the read-only SQL statements as Markdown. Run the test cases on a staging copy or local stack of your own project with invented records, and the SQL statements in your own SQL editor.
What Supabase RLS does once it is on, and what a table without it allows
Supabase's Row Level Security guide puts the risk plainly: a table in an exposed schema without RLS is readable and writable by any role with a grant on it, and the guide says to enable RLS on every table in an exposed schema. Whether a table has it depends partly on how the table was made. Supabase's Securing your API guide says tables created through the Supabase Dashboard have RLS enabled by default, and that RLS has to be enabled explicitly for tables created in the SQL Editor or through another tool. That is one way a Supabase table ends up with RLS not enabled: it came from a migration script or another tool, and the statement that enables it was never part of the script. Turning it on changes the starting point. PostgreSQL's chapter on row security policies says that when row security is enabled on a table, all normal access to the table for selecting or modifying rows must be allowed by a row security policy, though the table's owner is typically not subject to row security policies, and that if no policy exists for the table, a default-deny policy is used, meaning that no rows are visible or can be modified. Supabase describes the same effect for its API: once RLS is enabled, no data is accessible through the API when using a publishable key, until you create policies. The order matters the other way round as well. PostgreSQL's ALTER TABLE reference says policies can exist for a table even if row-level security is disabled, and that in this case the policies will not be applied and will be ignored. So the checklist raises a point when the SQL you paste has policies for a table, or you marked the table as holding rows that belong to one user or one organisation, and the paste has no ENABLE ROW LEVEL SECURITY statement for it, or its last ENABLE or DISABLE statement is DISABLE. The point shows the statement that turns it on, labelled as a change to test on a staging copy first.
How Supabase RLS policies are matched to a command and a role
Which requests a policy applies to depends on the command and the roles it names. PostgreSQL's CREATE POLICY reference gives each policy an optional FOR clause and an optional TO clause and states the defaults: ALL is the default command, and the default role is PUBLIC, which will apply the policy to all roles. Policies are permissive by default. Supabase's Row Level Security guide names the two roles its API maps requests to, anon for an unauthenticated request and authenticated for a request from a signed-in user, and says to always name the role a policy applies to, using the to clause. It also says the anon role is different from an anonymous user in Supabase Auth, who assumes the authenticated role. The matrix in this tool applies those rules to the text. A cell lists a policy when its FOR clause gives that command or ALL, or is missing, and its TO clause names that role or PUBLIC, or is missing. Where several policies sit in one cell, PostgreSQL combines them: all the permissive policy expressions are combined using OR, all the restrictive policy expressions are combined using AND, and the results are combined using AND. If there are no permissive policies, access is denied, and if only restrictive policies exist, no records will be accessible. Two more rules reach beyond a single cell. PostgreSQL says an UPDATE typically, and a DELETE in most cases, also needs to read data from columns of the table, and that SELECT rights are then required and the appropriate SELECT or ALL policies are applied in addition. And Supabase's guide says grants decide whether a role can run an operation on the table at all, while policies decide which rows that operation applies to. The tool reads neither grants nor role memberships, and PostgreSQL says normal role membership and inheritance rules apply. A policy written only for another role is therefore listed under neither anon nor authenticated, with a note that says so.
USING, WITH CHECK and an expression that is simply true
PostgreSQL checks existing rows against a policy's USING expression and new rows from an INSERT or UPDATE against its WITH CHECK expression. The CREATE POLICY reference says a row for which USING returns false or null is not visible, and that typically no error occurs, while a WITH CHECK expression that returns false or null causes an error. It says a SELECT policy and a DELETE policy cannot have a WITH CHECK expression and an INSERT policy cannot have a USING expression, so the tool counts a statement that breaks one of them as not read. For ALL and UPDATE policies with no WITH CHECK expression, PostgreSQL uses the USING expression both to determine which rows are visible and which new rows will be allowed to be added. The tool notes that, with what Supabase's guide says in its UPDATE example: the with check clause decides what the resulting row is allowed to look like. The reference does not say what applies to an INSERT policy with no WITH CHECK expression, so the tool flags it and gives no outcome. An expression that is the literal true is true for every row. Supabase's guide says a policy that reads to anon using ( true ) grants every unauthenticated visitor read access to every row the role can already reach through grants, and to use it only for data that is meant to be public. The tool marks a literal true in a permissive policy for review when your answer for a role and command it names is anything other than every row, and as a note otherwise or when the policy is restrictive. On a table you marked as holding owned rows, it raises a permissive policy whose expressions never name auth.uid(), which Supabase's guide says returns the ID of the user making the request. The same guide also reaches the caller through auth.jwt() and security definer functions, which the tool does not read, so the point only asks you to check the policy. This point is not added to a policy whose expressions are all the literal true.
Running the two-user test cases and the read-only SQL
What a database does with the text has to be tested, and Supabase's guide to testing RLS with pgTAP says what to assert: for each table that holds user data, that a second user cannot read, update or delete the first user's rows. It also says to test through roles, because a check on pg_policies passes while the policy is still wrong. The test cases take that shape with two invented accounts. User A creates one invented row, or you seed it where your answers stop a signed-in user inserting. User B, signed in, and a signed-out client each try to read it, insert a row, change it and delete it, and every step states the result your answer for that role expects. The steps are for your own project, on a staging copy or local stack, with invented records and one request for each step. No step uses a secret key or the service_role key: Supabase's API keys guide says policies never apply to a secret key, because service_role has the BYPASSRLS attribute. So a request that carries only a secret key is no test of your policies. A refusal can look like success. Supabase's Row Level Security guide says a missing grant and a with check violation each raise error 42501, while a using clause that filters the row out raises nothing and matches zero rows. So each update or delete step that expects a refusal ends by reading the row as user A to confirm it is intact. The second output is three SELECT statements on PostgreSQL's catalogue. The first reads pg_class, where relrowsecurity is true if the table has row-level security enabled and relforcerowsecurity is true if row-level security, when enabled, will also apply to the table owner. The second reads the pg_policies view: each policy's schema, table, name, whether it is permissive or restrictive, its roles, its command type and its two expressions. The third lists the tables with row level security off in the schemas you typed, or in public if you typed none. None of the three changes data or settings.
How the tool reads your SQL, and what it masks
Table names, answers and pasted SQL are not sent anywhere and are not saved on your device. When a checklist is built, the page sends one analytics event that names the tool and the page, and nothing you typed, chose or pasted. The paste is split into tokens and commands following section 4.1, Lexical Structure, of the PostgreSQL 18 documentation: comments are dropped, a string constant, a dollar-quoted string or a quoted identifier is one token, key words are case insensitive, a quoted name keeps its case, and a semicolon outside a string constant or quoted identifier ends a command. The tool then reads two kinds of command: CREATE POLICY, in the clause order of its synopsis, and ALTER TABLE with ENABLE, DISABLE, FORCE or NO FORCE ROW LEVEL SECURITY. Every other command is counted and named by its kind, not read. Commands are not replayed, so a later ALTER POLICY, DROP POLICY or DROP TABLE changes nothing the matrix shows for an earlier CREATE POLICY. A carriage return counts as whitespace as well as a space, tab and newline, and only the letters A to Z of an unquoted name are folded to lower case: both differ from the PostgreSQL page on purpose. String constants are read as the page describes for standard_conforming_strings on, which it gives as the default. A U& identifier is not decoded, so a statement using one as a name is not read. A table name in the paste matches one in your list when the table parts are the same name and, where both give a schema, so are the schemas. Before any of this, three things are masked: a JWT-shaped string (three base64url parts joined by full stops, the first starting eyJ), a string starting sb_secret_, and a value assigned to a service role key name with =, :, := or =>, or alone on the next line after a colon. The tool then says so and points to Supabase's guide on rotating a leaked or compromised API key. A publishable key and the role name service_role are not masked.
The limits, and what the checklist cannot tell you
One run takes up to 30 tables, 140 characters in a table name box, 50,000 characters of SQL and 200 CREATE POLICY statements. Input over a limit is refused with the reason, not cut, so a result always covers every named table and the whole paste. A table with no name is left out, a table named twice is refused, and so is a name holding a single quote, backslash or backtick, because the tool writes each name unescaped into a SQL string constant inside a Markdown code block. Some lists on screen are shortened, and each cut is marked. A matrix cell lists up to 5 policies and shows up to 300 characters of each expression. A policy, table or role name from the paste is cut at 80 characters. A point names up to 5 policies or tables before it counts the rest. The list of points shows up to 100, the most serious first, and the list of statements that were not read names up to 12 kinds. A paste with nothing the tool reads raises a note saying so and no points about tables or policies. Every point is marked Review or Note. None is a pass, because the tool has read text and has not seen a database, and a checklist that raises no points is not a pass either. A point that states a rule names the PostgreSQL or Supabase page the rule comes from. The checklist cannot tell you whether a policy exists in your database, what an expression evaluates to, or whether the SQL you pasted is what the database holds. It does not read grants, functions, views, storage policies or column privileges, and it cannot see role memberships, table owners or which roles bypass row level security. PostgreSQL says superusers and roles with the BYPASSRLS attribute always bypass the row security system when accessing a table, and that table owners normally bypass it as well unless the table is set to FORCE ROW LEVEL SECURITY. Those facts live in the database, where the test cases and SQL statements run.
Sources
- Supabase: Row Level Security
- Supabase: API keys
- Supabase: Securing your API
- Supabase: Test Row Level Security policies with pgTAP
- Supabase: Rotate a leaked or compromised API key
- PostgreSQL Global Development Group: PostgreSQL 18 documentation: 5.9. Row Security Policies
- PostgreSQL Global Development Group: PostgreSQL 18 documentation: CREATE POLICY
- PostgreSQL Global Development Group: PostgreSQL 18 documentation: ALTER TABLE
- PostgreSQL Global Development Group: PostgreSQL 18 documentation: 4.1. Lexical Structure
- PostgreSQL Global Development Group: PostgreSQL 18 documentation: pg_class
- PostgreSQL Global Development Group: PostgreSQL 18 documentation: 52.32. pg_namespace
- PostgreSQL Global Development Group: PostgreSQL 18 documentation: pg_policies
Worked example
An invented example, not taken from any project, and the one the Load an invented example button fills in: a notes table that holds each user's own notes, with the tool's starting answers and three pasted statements.
- Table
- notes, marked as holding owned rows
- Answers
- anon nothing, authenticated own rows only
- Statement 1
- ALTER TABLE notes ENABLE ROW LEVEL SECURITY
- Statement 2
- a SELECT policy for authenticated that compares auth.uid() with user_id
- Statement 3
- an INSERT policy with no TO clause and WITH CHECK ( true )
Four points to review: the INSERT policy has no TO clause, its WITH CHECK expression is the literal true, it names INSERT for anon where the answer is nothing, and no permissive policy names UPDATE or DELETE for authenticated.
The matrix lists the INSERT policy under both anon and authenticated, because PostgreSQL says a policy with no TO clause applies to all roles. Whether a signed-out client can really insert a note depends on the database and its grants, which the tool has not seen, so the next step is the INSERT test cases on a staging copy.
Who uses this tool
Developers preparing a Supabase app for launch
List every table the app reads or writes, record what anon and authenticated should reach, and run the two-user test cases on a staging copy before real users sign up.
Teams reviewing a migration
Paste the policy statements from a pull request to see each one beside the access you intended, with points for a missing TO clause, a missing WITH CHECK or an expression that is the literal true.
Founders with an app made in an AI builder
Run the three read-only SQL statements in your own SQL editor to see which tables have row level security on and which policies the database holds.
Developers chasing an empty result
Check whether any policy in the paste names the role and command that returns nothing, and read how a row that is filtered out differs from a request that is refused.
Frequently asked questions
Does this Supabase RLS checklist connect to my project?
No. It has no field for a project address or a key, and it reads only the table names, answers and SQL you type or paste, in this page. None of it is sent anywhere or saved on your device. When a checklist is built, the page sends one analytics event that names the tool and the page, and nothing you typed, chose or pasted. Because it never connects, the result is a review checklist and not a check of your database.
What happens when RLS is enabled and a table has no policies?
PostgreSQL's chapter on row security policies says that if no policy exists for the table, a default-deny policy is used, meaning that no rows are visible or can be modified. Supabase's guide describes the same effect for its API: once RLS is enabled, no data is accessible through the API when using a publishable key, until you create policies. PostgreSQL adds that superusers and roles with the BYPASSRLS attribute always bypass row security, and that table owners normally do as well.
How do I find Supabase tables with RLS not enabled?
Run the third SQL statement the tool writes. It is a SELECT on pg_class joined to pg_namespace that lists each ordinary or partitioned table whose relrowsecurity is false, in the schemas you typed or in public if you typed none. PostgreSQL's pg_class reference says relrowsecurity is true if the table has row-level security enabled. Supabase's guide says to enable RLS on every table in an exposed schema.
Does the Supabase service_role key bypass RLS?
Supabase's API keys guide says policies never apply to a secret key, because service_role has the BYPASSRLS attribute, and it lists the service_role key as the legacy version of secret keys. Its Row Level Security guide adds a condition: a secret key bypasses RLS only when the request carries no user access token. The API keys guide says never to put a secret key in a browser, a shipped application or source control, and no test step this tool writes uses one.
Why does the tool raise a policy with USING (true)?
The literal true is true for every row, and PostgreSQL says rows for which the USING expression returns true will be visible. In a permissive policy, the tool marks it for review when your answer for a role and command it names is narrower than every row, and as a note otherwise. In a restrictive policy it is a note. Supabase's guide says a policy that reads to anon using ( true ) grants every unauthenticated visitor read access to every row the role can already reach through grants.
What can the checklist not tell me about my Supabase RLS policies?
Whether they exist in your database, what their expressions evaluate to, and whether the SQL you pasted is what the database holds. It does not read grants, functions, views, storage policies or column privileges, and it cannot see role memberships or which roles bypass row level security. A checklist with no points is not a pass. The two-user test cases and the read-only SQL statements are how you find out what the database does.