pgquery

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. Nothing to install on your laptop, no account, and the server side is one small container.

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.

How it works

The interface is a single-page app. A Go proxy in the same container turns HTTP requests from your browser into Postgres connections, runs the query and returns rows. The proxy keeps no state: saved connections, tabs and history live in your browser's localStorage.

Run it

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

Then open http://localhost:54280 and paste a connection string. Both postgres://user:pass@host:5432/db URIs and Npgsql / ADO.NET style key=value strings (Host=…;Database=…) work.

When a browser client is the right choice

A browser client shines when you work from several machines, want to give a teammate access without installing anything, or run Postgres on a server where a desktop app cannot reach it directly. Put pgquery next to the database, behind your VPN or reverse proxy, and everyone gets the same tool at 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?

Only through the proxy you run. When you self-host, queries go from your browser to your 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