PostgreSQL connection string builder & parser

Build a libpq connection URI (and JDBC URL) from fields, or paste one to parse it back.

Connection URI

postgresql://app@localhost:5432/mydb?sslmode=require

JDBC URL

jdbc:postgresql://localhost:5432/mydb?sslmode=require&user=app

Runs in your browser. Nothing you type is sent anywhere.

How this works

Do this against your live database in Tablyne.

PostgreSQL GUI →

FAQ

Why is my password full of %XX codes? +

Any reserved URI character in a password (like @ or /) must be percent-encoded, or the URI parses incorrectly — this tool does that for you automatically.

Does postgres:// work the same as postgresql://? +

Yes — libpq accepts both schemes interchangeably.

Why does the JDBC URL put user/password after a ?, unlike the plain URI? +

pgjdbc's own docs only show user/password as query parameters (or a separate Properties object) — never as user:password@ in the URL authority, so this tool follows that format exactly.

Can I connect over a Unix socket? +

This tool builds the common TCP host:port form. For a Unix socket, libpq also accepts postgresql:///dbname?host=/var/run/postgresql — set the host as a query parameter.