pgAdmin 4 — the official PostgreSQL GUI for Windows
pgAdmin 4 is the official open-source administration and development tool for PostgreSQL. It runs as a web application in your browser (served locally) and provides a visual interface for managing databases, running queries, viewing data, configuring users and monitoring server activity. It is bundled with the EDB Windows installer, so if you installed PostgreSQL via the standard installer, pgAdmin 4 is already available.
How to open pgAdmin 4 on Windows
- 1
Open from Start menu
Press Win → search pgAdmin 4 → click the result. pgAdmin launches a local server and opens in your default browser. The first launch can take 30–60 seconds.
- 2
Set a master password
On first launch, pgAdmin asks you to set a master password. This password encrypts your saved server passwords within pgAdmin. It is separate from your PostgreSQL superuser password.
- 3
Connect to your PostgreSQL server
In the left panel, right-click Servers → Register → Server. Fill in the connection details:
Name (General tab): My Local DBHost (Connection tab): localhostPort: 5432Maintenance DB: postgresUsername: postgresPassword: your_postgres_passwordClick Save. The server appears in the left panel — click it to connect.
- 4
Browse databases and run queries
Expand the server → Databases → your database → Schemas → Tables. Right-click any table for quick actions. To run SQL, click Tools → Query Tool.
Run SQL queries in pgAdmin
Open the Query Tool: select a database in the left panel → Tools menu → Query Tool. Type your SQL and press F5 or click the Run button:
pgAdmin tips for Windows users
pgAdmin takes a long time to open
pgAdmin shows "Unable to connect to server"
sc query postgresql-x64-18), (2) you are using the correct port (default 5432), (3) the host is localhost for local connections. If you changed the port, update the pgAdmin connection.I forgot my pgAdmin master password
%APPDATA%\pgAdmin and delete pgadmin4.db. Note: this also deletes your saved server passwords — you will need to re-enter them.