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
- Sign in to the Neon Console and select your project.
- On the Project Dashboard, click Connect.
- Pick a Branch, Compute, Database, and Role.
- Copy the URL. Toggle Connection pooling off if you need the direct URL (no
-poolerin the hostname).
Neon URLs follow this shape:
postgresql://<role>:<password>@<endpoint-id>[-pooler].<region>.aws.neon.tech/<database>?sslmode=require&channel_binding=requireReal example:
postgresql://alex:AbC123dEf@ep-cool-darkness-a1b2c3d4-pooler.us-east-2.aws.neon.tech/dbname?sslmode=require&channel_binding=requirePaste 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 URL | Can you change it? |
|---|---|
Role (alex) | Yes, pick a different role in the Connect modal, or create a new role |
| Password | Yes, 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 suffix | Yes, toggle Connection pooling in the modal |
| Region | No, it's set when the project is created |
| Database | Yes, 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.

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








