Connection string builder
No sign-up. Everything here runs in your browser; nothing is sent, the password included.
URI
psql, libpq, psycopg, asyncpg, node-postgres, pgx, Prisma, DATABASE_URL · connected with on a real server
postgresql://app_user@localhost:5432/app
Keyword/value (libpq)
psql, psycopg, pgx, any libpq program · connected with on a real server
host=localhost port=5432 dbname=app user=app_user
JDBC
Java (pgJDBC), DBeaver, IntelliJ, Spring
jdbc:postgresql://localhost:5432/app?user=app_user
SQLAlchemy
Python with SQLAlchemy and psycopg 3
postgresql+psycopg://app_user@localhost:5432/app
.NET (Npgsql)
C#, EF Core
Host=localhost;Port=5432;Database=app;Username=app_user
psql command
Shell · connected with on a real server
psql postgresql://app_user@localhost:5432/app
Environment variables (libpq)
psql, pg_dump and every libpq program, with no string at all · connected with on a real server
export PGHOST=localhost export PGPORT=5432 export PGDATABASE=app export PGUSER=app_user
Special characters in a password
In a URL these must be percent-encoded. Key=value forms (libpq, ADO.NET, ODBC, JDBC for SQL Server) quote the value instead, and the Go MySQL DSN takes the password as it is. Per-database details: PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, MongoDB, SQLite.
| Character | In a URL | Why it breaks |
|---|---|---|
| @ | %40 | Ends the user name and password: everything after the first unencoded @ is read as the host. |
| : | %3A | Separates user from password, and host from port. |
| / | %2F | Starts the database name. |
| ? | %3F | Starts the options. |
| # | %23 | Starts a fragment: the rest of the string is thrown away. |
| % | %25 | Starts an escape itself, so a literal % must be escaped too. |
| & | %26 | Separates options. |
| + | %2B | Some parsers (PyMongo among them) read + as a space. |
| space | %20 | Ends the string on a command line, and is trimmed by some parsers. |
Questions
Is my password sent anywhere?
No. The strings are parsed and built in your browser by code on this page; nothing you type is sent to a server or stored.
Which forms can I paste in?
URLs (postgresql://, mysql://, mariadb://, mongodb://, mongodb+srv://, SQLAlchemy URLs such as postgresql+psycopg://), JDBC URLs for all six server databases, libpq keyword/value strings, ADO.NET and ODBC key=value strings, Go MySQL DSNs, Oracle Easy Connect and connect descriptors, a DATABASE_URL line from a .env file, and SQLite paths.
Why does my password with an @ break the connection string?
In a URL the first @ ends the user name and password, so a raw @ in the password makes the driver read the rest as the host. Percent-encode it as %40 (and : as %3A, / as %2F, # as %23, % as %25). Key=value forms need quoting instead of encoding, and the Go MySQL DSN needs neither. The builder does the right one for each form.
Were these strings tested?
Each form the page can read is parsed back and compared with what built it, for every database and TLS setting, using a password made of every awkward character. The forms marked "connected with on a real server" were then used to log in to PostgreSQL 16, MySQL 8, MariaDB 11, SQL Server 2022, Oracle 23ai, MongoDB 7 and SQLite, through their own drivers and command-line clients.
What does the TLS setting change?
"TLS, verify the certificate" encrypts the connection and checks that the server is who it claims to be — what you want across any network you don't control. "Don't check the certificate" still encrypts but would not notice an impostor. Each driver spells this differently (sslmode, sslMode, Encrypt, tls), so the builder writes it for you.
Got the string working? Point it at something useful.
Paste it into DBShifts to browse the database with sensitive columns masked, or to migrate it to another engine with every table checked afterwards.
Other free tools
Text-to-SQL safety checker
Paste SQL an AI wrote: is it read-only, which tables does it touch, and what should worry you.
SQL query converter
A MySQL query rewritten for PostgreSQL, SQL Server, Oracle or SQLite, with what behaves differently.
MySQL schema converter
MySQL CREATE TABLE statements as PostgreSQL, SQL Server, Oracle or SQLite DDL — what a real migration creates, every type change flagged.
Read-only database user generator
Exact commands for a read-only user on six engines, every variant tested on real servers.
Data receipt verifier
Paste an agent's result and check that DBShifts returned exactly that data, against a ledger that cannot be edited.