PgDeck

PostgreSQL GUI for Supabase

Use a desktop PostgreSQL GUI with Supabase.

Supabase is PostgreSQL, so any Postgres client connects to it - the Studio dashboard is a convenience, not a requirement. What trips people up is which of the two connection strings to use, and why the obvious one sometimes refuses to connect at all.

Short answer: Copy the connection string from Project Settings, Database, in the Supabase dashboard and paste it into your client. Use the Session pooler string unless you know you need a direct connection: direct connections are IPv6-only on newer projects, which is why the host resolves but never connects on many home and office networks. SSL is required either way.

PgDeck PostgreSQL desktop client with schema navigation, table filtering, row editing, and SQL tools

Why developers use PgDeck

PgDeck is shaped around PostgreSQL tasks that happen every day: connect, inspect, filter, edit, query, manage structure, copy, and export.

Paste the Supabase connection URL and every field is filled in for you
Session pooler strings work over IPv4 where direct connections do not
SSL required mode is set automatically from the pasted URL
Browse the auth and storage schemas alongside your own tables
Export any table or query result to CSV, JSON, or SQL INSERT statements

Secure connections

Save PostgreSQL connection details with encrypted passwords, SSL settings, URL import, testing, search, edit, and delete actions.

Schema and data grid

Browse schemas and tables, search the table list, pin favorites, filter rows, sort columns, resize columns, and paginate results.

SQL workspace

Run SELECT and non-SELECT statements from multi-tab SQL editors with syntax highlighting and interactive query results.

Staged editing

Edit cells, add rows, duplicate rows, set NULL, stage deletes, review pending changes, and commit everything in one transaction.

Connect PgDeck to a Supabase database

  1. Find the connection string

    In the Supabase dashboard open Project Settings, then Database, then Connection string, and choose the URI tab. Supabase shows several strings - direct connection, session pooler, and transaction pooler - and they are not interchangeable. The password shown is your database password, not your Supabase account password; if you never saved it, reset it on that page.

  2. Pick the right one

    Session pooler is the right default for a GUI client: it works over IPv4, and session mode supports everything a desktop client does. Transaction mode on port 6543 is built for serverless functions and does not support prepared statements or session-level features, so avoid it here. Use the direct connection only if your network has working IPv6.

    # Session pooler (recommended for a GUI client)
    postgres://postgres.abcdefghijklm:PASSWORD@aws-0-eu-central-1.pooler.supabase.com:5432/postgres
    
    # Direct connection (IPv6 only on newer projects)
    postgres://postgres:PASSWORD@db.abcdefghijklm.supabase.co:5432/postgres
  3. Paste the URL into PgDeck

    Create a new connection and use Import from URL rather than typing the fields. Pasting fills in host, port, database, user, and SSL mode together, which avoids the most common mistake: the pooler username is postgres.your-project-ref, not postgres, and typing it by hand usually drops the suffix.

  4. Keep SSL on

    Supabase rejects unencrypted connections, so sslmode must be require or stricter. The pasted URL already carries the right setting. If you built the connection by hand and see a message about the server not supporting SSL, that setting is the cause.

  5. Look in the right schema

    Your tables are in the public schema. Supabase also creates auth, storage, and realtime schemas that hold its own data - auth.users is where your user records live, which is worth knowing before you go looking for a users table in public and conclude the connection is wrong.

Why the direct connection often fails

Supabase moved direct database connections to IPv6 for newly created projects. If your ISP, office network, or CI runner has no IPv6 route, the hostname resolves and the connection then times out - which looks like a firewall problem and is not one. The session pooler is reachable over IPv4, which is why it is the right default for a desktop client. The alternative is the paid IPv4 add-on.

What a desktop client adds over Supabase Studio

Studio's table editor is good and it is right there in the browser. A desktop client earns its place on the jobs Studio is not built for: correcting a set of related rows as one reviewed transaction, filtering a large table with type-aware operators, running a multi-tab SQL session, exporting a result set to CSV or SQL INSERT statements, and looking at an ERD of your foreign keys.

Row Level Security still applies

Connecting as the postgres user means you are the table owner and RLS policies do not restrict you, which is exactly what you want for administrative work and exactly what makes it dangerous. A query that returns everything in a desktop client may return nothing to your application, because the application connects through PostgREST as an authenticated or anonymous role. Do not use the GUI to conclude that your RLS policies work.

Bulk work belongs in a desktop client

Correcting a few hundred rows, backfilling a new column, or exporting a table for analysis is where a browser table editor gets tedious. Staged edits committed in a single transaction mean a multi-row correction lands as one unit, and the export path gives you CSV, JSON, or SQL INSERT statements directly from a filtered view.

Can I use a PostgreSQL GUI with Supabase?

Yes. Supabase is standard PostgreSQL, so any client works - PgDeck, pgAdmin, DBeaver, TablePlus, or psql. Copy the connection string from Project Settings, Database in the dashboard and paste it into the client.

Why can I not connect to my Supabase database?

The most common cause is using the direct connection string on a network with no IPv6 route, which times out rather than failing clearly. Use the session pooler string instead. The next most common causes are a missing sslmode, and dropping the project-ref suffix from the pooler username, which must be postgres.your-project-ref.

Which Supabase connection string should I use in a GUI?

The session pooler string. It works over IPv4 and session mode supports everything a desktop client needs. Avoid the transaction pooler on port 6543 - it is designed for serverless functions and does not support prepared statements.

Where is my Supabase database password?

It is set when the project is created and is not your Supabase account password. If you did not save it, reset it under Project Settings, Database. Resetting it invalidates existing connection strings, so update anything else using them.

Does connecting a GUI bypass Row Level Security?

Effectively yes, if you connect as the postgres user, because the table owner is not subject to RLS policies. That is useful for administrative work but means a desktop client cannot be used to verify that your RLS policies behave correctly for application users.