Database Connection String Builder
Assemble correct, URL-encoded connection strings for the databases you use most — nothing leaves your browser.
Connection details
Connection strings
postgresql://admin@localhost:5432/mydb
jdbc:postgresql://localhost:5432/mydb
host=localhost port=5432 dbname=mydb user=admin
About this tool
Database connection strings are fiddly and database-specific: the scheme, credential placement, port and database joining, and — most commonly forgotten — percent-encoding special characters in passwords all vary. A single unencoded @ or : in a password breaks the URI. This builder turns a plain form into a correct, properly URL-encoded connection string for PostgreSQL, MySQL, MongoDB, Redis and SQLite.
Credentials are percent-encoded automatically, sensible default ports are pre-filled, and toggles cover SSL/TLS, MongoDB's mongodb+srv DNS seed-list format and arbitrary extra parameters. Where relevant the tool also emits a JDBC URL and a libpq keyword/value string, so you can paste the right form into your ORM, driver or CLI. Nothing you type — host, username or password — is ever transmitted or stored.
How to use
Pick your database
Choose PostgreSQL, MySQL, MongoDB, Redis or SQLite; the default port fills in.
Fill in the details
Enter host, credentials, database name and any extra parameters. Passwords are encoded for you.
Toggle the options
Enable SSL/TLS, or mongodb+srv for managed clusters like Atlas.
Copy the string
Copy the connection URI, or the JDBC / libpq variant, into your config.
Output formats
| Format | Used by |
|---|---|
| Connection URI | Most drivers and ORMs (scheme://user:pass@host:port/db) |
| JDBC URL | Java drivers for PostgreSQL and MySQL |
| libpq key/value | psql and libpq-based Postgres clients |
| mongodb+srv | MongoDB DNS seed-list connections |
Credentials are URL-encoded automatically and never leave your browser.
Frequently asked questions
Related tools
Subnet Calculator
Calculate IPv4 and IPv6 subnets from CIDR notation — network address, broadcast, usable host range, subnet mask, wildcard mask, and a visual bit map
Programmer Calculator
Multi-base calculator with simultaneous binary, octal, decimal and hex views, bitwise AND/OR/XOR/NOT/shift operations, and IEEE 754 float inspection
Docker Compose Builder
Build a valid docker-compose.yml from a visual form — services, images, ports, volumes, environment variables, restart policies and dependencies
NGINX Config Builder
Generate an NGINX server config from a visual form — reverse proxy, static hosting, SPA fallback, SSL termination and HTTP-to-HTTPS redirects
Regex Explainer
Break down a regular expression into a plain-English, token-by-token explanation with a live match preview and a library of common patterns