← All tools
Free tool

PostgreSQL connection string builder

Build a PostgreSQL URI from parts, or paste one to decode every field and check pooler, SSL, and Prisma settings. Presets for Supabase, Neon, and Railway. Passwords never leave your browser.

Build a connection string
postgresql://postgres.PROJECT_REF@aws-0-REGION.pooler.supabase.com:5432/postgres?sslmode=require
Decode a connection string

Paste a URI to see every part decoded, user, host, port, database, and parameters.

The decoder runs in your browser and flags Supabase pooler mode, port, username, SSL, and Prisma settings. Nothing is uploaded.

PostgreSQL URI format and provider examples

Every PostgreSQL connection string uses the same URI shape. The differences between providers are the host, the port, the username, and whether the endpoint is a pooler.

postgresql://user:password@host:5432/database?sslmode=require
PartExampleNotes
Protocolpostgresql://postgres:// also works.
UserpostgresSupabase shared poolers add the project ref.
Passwordp%40sswordPercent-encode reserved characters.
Hostdb.example.comCopy it from the provider.
Port5432Supabase transaction pooling uses 6543.
DatabasepostgresThe database name, not the project name.
Querysslmode=requireCarries TLS and driver options.

A raw @ in the password ends the userinfo section early. Encode it as %40, and encode #, ?, /, and spaces too. The Supabase guide has the full encoding table.

Neon: pooled or direct

Neon uses the same port for both endpoints. The pooled hostname ends in -pooler; the direct hostname does not. Use the pooled endpoint for application traffic and the direct endpoint for migrations or tools that need session state.

# Pooled
postgresql://user:pass@ep-cool-rain-123456-pooler.us-east-2.aws.neon.tech/neondb?sslmode=require

# Direct
postgresql://user:pass@ep-cool-rain-123456.us-east-2.aws.neon.tech/neondb?sslmode=require

Railway: private and public URLs

Railway exposes DATABASE_URL for services inside the same project. For a connection from your laptop or another network, enable the public TCP proxy and use DATABASE_PUBLIC_URL. Both keep the standard PostgreSQL URI shape.

DATABASE_URL=postgresql://postgres:password@postgres.railway.internal:5432/railway
DATABASE_PUBLIC_URL=postgresql://postgres:password@[proxy-host]:[proxy-port]/railway

The host and port in the public URL come from Railway. Copy the variable instead of constructing the proxy hostname yourself.

Supabase: four modes, not one

Supabase changes the host, port, username, IP support, and prepared statement behavior across direct, session, transaction, and dedicated connections. The shared pooler is IPv4; direct and dedicated endpoints are IPv6 by default, with IPv4 available as a paid add-on. Use the Supabase connection string guide for the mode table, SSL setup, and driver settings.

Frequently asked questions

Related tools

Turn it into an ER diagram

Paste your PostgreSQL connection string and get an interactive ER diagram of your own schema in under 10 seconds. No signup required.