Click Connect on your Project Dashboard in the Neon Console. The Connect to your database modal builds the full Postgres URL for the branch, compute, database, and role you select. The hostname and username come from your compute endpoint and the chosen role, so you can't edit them freely. You can rotate the role's password (which changes the URL) and switch the branch, compute, or database the URL points to.

Copy the URL from the Console

  1. Sign in to the Neon Console and select your project.
  2. On the Project Dashboard, click Connect.
  3. Pick a Branch, Compute, Database, and Role.
  4. Copy the URL. Toggle Connection pooling off if you need the direct URL (no -pooler in the hostname).

Neon URLs follow this shape:

postgresql://<role>:<password>@<endpoint-id>[-pooler].<region>.aws.neon.tech/<database>?sslmode=require&channel_binding=require

Real example:

postgresql://alex:AbC123dEf@ep-cool-darkness-a1b2c3d4-pooler.us-east-2.aws.neon.tech/dbname?sslmode=require&channel_binding=require

Paste this directly into psql to test the connection:

psql "postgresql://alex:AbC123dEf@ep-cool-darkness-a1b2c3d4-pooler.us-east-2.aws.neon.tech/dbname?sslmode=require&channel_binding=require"

See Connect from any app for full details on each segment.

What you can and can't change in the URL

Part of the URLCan you change it?
Role (alex)Yes, pick a different role in the Connect modal, or create a new role
PasswordYes, reset it from the Console, API, or SQL
Endpoint host (ep-cool-darkness-...)No, it's the compute's ID. To change it, create a new compute or use a different branch
-pooler suffixYes, toggle Connection pooling in the modal
RegionNo, it's set when the project is created
DatabaseYes, select a different database, or create a new one
Query params (sslmode, channel_binding)Yes, these are client-side options you can adjust per connection

Rotate, don't edit

If you want a "new" connection string, the practical way to get one is to reset the role's password or create a new role. Editing the hostname by hand will break the connection.

Try the URL in psql

Walk through connecting to Neon with the psql client, including SNI workarounds for older versions.