pgquery Open the app

pgquery / Postgres GUI in the browser

Guide · Getting started

A Postgres GUI that runs in your browser

pgquery gives you a full PostgreSQL client in a browser tab. Open it, paste a connection string and work on your live database. Nothing to install, no account, and your connections stay in your browser.

What you get

Everything you would expect from a desktop client, plus the admin screens most clients skip:

  • A SQL editor with schema-aware autocomplete, tabs, history and CSV or JSON export.
  • A table editor for browsing, sorting, paginating and editing rows, including JSONB.
  • An ER diagram of your schema, exportable as SVG or PNG.
  • Roles, grants, Row Level Security policies, indexes, extensions, triggers and functions.
  • A query plan viewer, a performance advisor and a security advisor.

Open it

Go to the app and paste a connection string. Both postgres://user:pass@host:5432/db URIs and Npgsql / ADO.NET style key=value strings (Host=…;Database=…) work. To look around first, open the read-only sample database.

How it works

The interface is a single-page app. A small Go proxy turns HTTP requests from your browser into Postgres connections, runs the query and returns rows. Saved connections (S3 keys included), tabs and history live in your browser (localStorage). Each query is sent with its connection string to the pgquery server, which opens a connection, runs it and returns the rows. S3 requests work the same way, and uploaded and downloaded files pass through the server without being kept. The server is stateless and open source; its code does not log or store connection strings, keys, queries or files. To keep everything inside your own network, self-host.

The hosted app at pgquery.dev reaches databases and buckets on the public internet only (private and local addresses are refused), and limits rows per query, query time, upload size and requests per IP. Self-host to reach private networks and set your own limits.

Or run your own

docker run -p 54280:54280 ghcr.io/hxndrik/pgquery

Then open http://localhost:54280. See the self-hosting guide for Compose, settings and access control.

When a browser client is the right choice

A browser client shines when you work from several machines, can't install software on the one in front of you, or want to give a teammate the same tool without setting anything up. For a database inside a private network, run pgquery next to it, behind your VPN or reverse proxy, and everyone gets one URL.

Questions

Is pgquery free?

Yes. It is MIT licensed, free to use, modify and self-host, with no paid tier.

Does my data pass through a third party?

On pgquery.dev, each query goes from your browser through the pgquery server to your database; the server is stateless and its code does not log or store queries or connection strings. When you self-host, queries go from your browser to your own container to your database.

Which Postgres versions work?

Any server reachable over the normal wire protocol. Catalog queries use standard pg_catalog views.

More chapters